Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Ubuntu server. I ran:

chmod -R 700 /

when I was logged in as root. Now when I try to login as my normal user I immediately get kicked out. Is there anyway to log back in to the server whether it is root or whoever so that I can change the permissions? or am I totally screwed? I dont think I have root access enabled in the /etc/ssh/sshd_config file. I do have physical access to the server. I really need some help here.

share|improve this question

You are screwed. If you have physical access, the best thing you can do as a newbie user is complete re-installation. Even if you would find a way to log in, you will not be able to restore rights right. Rights are not uniform, and there are lots of files. Never mess with rights at large. I suppose you have no backups, do you? To get access:

  1. Plug in some bootable USB stick, (not sure if Ubuntu live has ssh enabled, but many rescue liveCDs surely do).

  2. Then reboot the machine with this stick, and you will be able to ssh into that system.

  3. From it, mount ubuntu disk to, say, /mnt/ubuntu, and do command chroot /mnt/ubuntu /bin/bash Voila, you are in your screwed Ubuntu as root.

Again, I suggest you use this access only to backup data and prepare headless installation. If you are not listening to advises, you can create root in your server: passwd root. Should be working, mostly.

share|improve this answer
While writing this, I presumed you have headless system. If not, skip part 2. – Barafu Albino Jun 26 '13 at 17:18
Hi, Thanks for your help. When backing up the data will it save all of my database content? also, where can I find usb bootable software? I do have a head on this linux box so I wouldn't have to ssh into anything. Could you please give me a step by step process of backing up all of the data as I am very new to all of this. – John Jun 26 '13 at 19:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.