0

When I realized that I did not have permission to access to the /root user's home directory, I followed the advice from this post which was to execute the command sudo -i (which I did) and then afterwards I executed the command sudo chmod -R 777 /root (which isn't the root of the file system).

With that being said, I wanted to revert my command sudo chmod -R 777 /root and sudo -i (whatever this one did...) to the previous and default permission (whatever that is) so I then executed the command sudo chmod -R 755 /root. Is the latter command the correct one to execute?

Thank you for your answers!

David
  • 1
  • 2
    sudo -i didn't really do anything in this context. However sudo chmod -R 755 /root doesn't really reverse your earlier command - in particular, it will leave any plain files unde /root with execute permission. Unfortunately there's no magic command to undo a recursive chmod. – steeldriver Apr 10 '20 at 19:34
  • @steeldriver, thank you for getting back to me! hmmm... I see. So, what will my “mistake” cost me? What will that do to my system, for example and is it big of an issue? What would you suggest in such a situation to remedy this situation (hopefully not reinstalling everything). – David Apr 10 '20 at 20:33

0 Answers0