0

I'm new to Ubuntu , while working with permissions I messed up with ~/usr directory and now I can't run sudo and pkexec both commands. Is there any other way to make ~/usr directory permission to default. I'm the root user and I tried several commands but none of them worked.

I entered into recovery mode and into root but it is saying read-only file system, can anyone give me step-by-step process to make it right. Thank you

Ubuntu was installed on server

swift
  • 3,281
  • 2
  • 23
  • 46
  • why cant you run sudo ... are you no longer in the sudoers? does it say something like no availability for this user to use sudo.. sorry don't know the exact wording.. if that is the case let me know and I can fix that for you so you can sudo again – John Orion May 08 '16 at 04:39
  • What is ~/usr/ directory? There should not be a usr in /home. Did you mean you chmodded /usr/ or /etc/usr? If so ... quickest fix: backup your user files and re-install. – Rinzwind May 08 '16 at 04:46

1 Answers1

0

if you want to edit in recovery mode you need to type the following command:

mount -o rw,remount /

that will remount the root / with read/write permissions. Then if you knew what the original permissions are you could set them back but ... that would probably be a nightmare

Now the sudo problem .. if I had more information about that I may be able to resolve that for you also .. but I would need the information that I commented about in my first comment.

John Orion
  • 2,801