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!
sudo -ididn't really do anything in this context. Howeversudo chmod -R 755 /rootdoesn't really reverse your earlier command - in particular, it will leave any plain files unde/rootwith execute permission. Unfortunately there's no magic command to undo a recursivechmod. – steeldriver Apr 10 '20 at 19:34