Help recovering broken OS (permissions issue)
Posted
by
Guandalino
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Guandalino
Published on 2012-12-09T16:52:58Z
Indexed on
2012/12/09
23:44 UTC
Read the original article
Hit count: 204
(At the bottom there is an important update.)
I was doing experiments in order to backup a remote account to my local system, Ubuntu 12.04 LTS. I'm not confident with duplicity and probably, due to wrong syntax, some local files have been replaced with remote files. This is just a supposition, I'm not sure this is the real cause of OS corruption. The corruption happened after experimenting with backups, so I think I did something wrong at this regard.
I was aware there was a problem when I tried to access a command using sudo
:
$ sudo ls
sudo: unable to open /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
This is how /etc/sudoers looks like:
$ ls -ald /etc/sudoers
-r--r----- 1 root root 788 Oct 2 18:30 /etc/sudoers
At this point I tried to reboot and now this is the message I get:
The system is running in low graphics mode.
Your screen, graphics card and input device
settings could not be detected correctly.
You will need to configure these yourself.
I tried to follow the wizard to configure these settings, but without luck (the system prevents me going on when I press "Next").
The thing that makes me a bit less worried is that all the data on the disk seems readable and I'm able to access them using a live cd. I run memtest and RAM seems to be OK.
Do you have any idea about how to recover my system? I'm very glad to provide further information, just let me know what info could be helpful.
UPDATE. The issue is about wrong permissions and this is how I discovered: I mounted the root partition of the broken OS on /mnt/broken/
(live CD) and did ls /mnt/broken/
. I got a permission denied error, while I expected to have the directory listing. I had to do sudo ls /mnt/broken/
and this worked. Thus without having root permission via sudo it's impossible to access the root of broken os.
The current output of ls -ld /mnt/broken/
is:
drwxr-x--- 29 1000 812 4096 2012-12-08 21:58 /mnt/broken
Any thoughts on how to restore the old (working) set of permissions?
© Ask Ubuntu or respective owner