0

I was trying to deny permissions to access the root folder to all non sudoers, and had the (NOT) brilliant idea to run sudo chmod 770 /. Now I get permission denied for all commands.

I am running Ubuntu 15.10 on Virtual Box and the installation is encrypted.

How can I fix it?

Hugo Lobo
  • 375
  • I've read I can use a live environment to undo this but I don't know how to do it via Virtual Box, with an encrypted installation (I have the key, though). – Hugo Lobo Jan 05 '16 at 04:59

2 Answers2

4

Luckily you haven't used -R option so you can easily revert it by following command:

sudo chmod 755 /

755 is the default permissions for the / directory.

chaos
  • 27,506
  • 12
  • 74
  • 77
  • This won't work.. Sudo is inside root so executing it is not permitted since you can't get into the folder – avmohan Jun 11 '16 at 13:18
1

Was able to fix it by booting into a root shell following the procedure in the answer to this question: How do I boot into a root shell? And entering chmod 755 /.

Hugo Lobo
  • 375