Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Regain control of accidental permission change of '/'
We accidently chmod-ed 777 in whole directory structure. So, The situation is that we cannot access root or ‘sudo’ mode for our normal user. We also may have changed the permission of critical files like /etc/passwd /etc/shadow and /etc/sudoers , which seem to have causing the problem.
The idea solution, if it was our server would be to change the permission from another machine and then chroot back and do necessary changes. Since this is hosted on DigitalOcean cloud, this seems impossible.
How do I recover root and sudo access?
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.×