xbianonpi / xbian

XBMC on Raspberry Pi, Bleeding Edge
https://xbian.org
GNU General Public License v3.0
294 stars 44 forks source link

SOLVED: No Write Permission for Root User #616

Closed heidaga closed 10 years ago

heidaga commented 10 years ago

The file "/etc/crontab" cannot be modified whether I am logged as root or using sudo with the default xbian user. How can I grant myself as root write permissions to modify this file ?

anaconda commented 10 years ago

I'm able to modify it with sudo nano /etc/crontab. Could you paste the output of lsattr /etc/crontab?

heidaga commented 10 years ago

root@xbian:~# lsattr /etc/crontab -bash: lsattr: command not found

root@xbian:~# whereis lsattr lsattr: /usr/share/man/man1/lsattr.1.gz

should I unzip and install it ? Thanks for your reply Currently on Xbian 1.0RC2 RPi model B+

anaconda commented 10 years ago

No, that's its manual. Run sudo apt-get install --reinstall e2fsprogs and retry the lsattr command. If it still doesn't work use "/usr/bin/lsattr" in place of just "lsattr".

heidaga commented 10 years ago

Reinstalled it, now lsattr gives the following: ----i----------- /etc/crontab

anaconda commented 10 years ago

That's it. "i" means the file is marked as immutable. Not sure why it's set immutable as I'm on RC2 too and mine isn't.

You fix it by running: sudo chattr -i /etc/crontab

heidaga commented 10 years ago

It works :+1: Actually I ve tried using chattr before, but I had the same "command not found" error as with lsattr. Thanks for pointing me to re-install e2fsprogs, this is what solved the issue