Question

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

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.

Hello,

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:

https://docs.digitalocean.com/products/images/backups/how-to/create-and-restore/

Best,

Bobby

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 {} \;