Ubuntu – What are the standard file permissions for the /etc directory(file)


I kinda screwed up the /etc directory by running:

sudo chmod 417 /etc 

Leaving me unable to use sudo:

sudo: can't open /etc/sudoers: permission denied.
sudo: no valid sudoers sources foundm quitting

Ive been trying to fix it via recovery mode but i'm not sure to what mode I should set it.
(I know sudoers is 0440, but this doesnt fix it because /etc is still messed up.)

Oh and for the future, how do i add lines to files in etc without screwing up the permissions of etc?

Thanks in advance,

P.S. Im running in Virtual box if that makes a difference.

Booting in recovery and running:

root@joeri-VirtualBox:/# chmod 755 etc
chmod: changing permissions of 'etc' : read-only file system
root@joeri-VirtualBox:/# cd etc
root@joeri-VirtualBox:/etc# ls -ld
drw-rw-rwx 139 root root 12288 2012-04-19 16:29

Doesnt change the permissions of etc.
Doing the same on a self created folder on the desktop does, so chmod is working, just not on etc.

Best Answer

drwxr-xr-x 157 root root 12288 2012-04-19 07:40 /etc

sudo chmod 755 /etc

Hope that helps ...