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

By mistake I have made permission changes for /etc. Now it's giving me the following error message:

bash: /etc/bash.bashrc: Permission denied  
I have no name!@chandan-Inspiron-5520:~$ sudo /etc/init.d/apache2 restart  
sudo: unable to stat /etc/sudoers: Permission denied  
sudo: no valid sudoers sources found, quitting  
sudo: unable to initialize policy plugin  
share|improve this question
related:… – Kevin Bowen Jun 16 '13 at 23:23

As a next step after sputnik recommendation, you could do this: On a fresh install of a ubuntu server with the same version as your broken one, run this:

find /etc -type f -executable | awk '{printf("chmod a+x %s\n",$0);}' >

Then import the script (using wget or ftp) and execute it on the broken server. on ubuntu 13.04 this step restored most of the functionalities.

share|improve this answer
here is a list from my desktop:… – Rinzwind Aug 8 '14 at 0:50

What I would do :

$ sudo su
# chown -R root:root /etc
# find /etc -type f -exec chmod 644 {} +
# find /etc -type d -exec chmod 755 {} +
# chmod 755 /etc/init.d/* /etc/rc.local /etc/network/* /etc/cron.*/*

Maybe it's not sufficient, but without any backup, that's a good start.

share|improve this answer
gksudo chown -R root:root /etc/
gksudo chmod -R u+x /etc/
gksudo chmod -R a+r /etc/

should work. This is will give read and execute permissions to everything in /etc/. gksudo doesn't depend on the sudoers file to work like regular sudo does. This will give you a working point to get everything else back.

share|improve this answer

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.