How to fix broken permissions on /etc, Accidentally ran chmod -R 755 /etc Ubuntu

I would just like to achieve enough functionality to transfer my Postgres database from this droplet to another one since /etc’s permissions are severely broken and I’ve been recommended by everyone to try and recover as much as possible and just rebuild the droplet

Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
May 17, 2022


In addition to what has been mentioned, if this is still not working, it would be best to revert to a working backup as described here:



Site Moderator
Site Moderator badge
May 17, 2022

hi @kodakay,

Well, it won’t be universal for all files and folders but you can try to chmod the permissions of each file to 644 and each folder to 755. You can achieve this by running:

  1. find /etc -type d -exec chmod 0755 {} \;
  2. find /etc -type f -exec chmod 0644 {} \;

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.