Which directories should be owned by root?
by LegionOfHell from LinuxQuestions.org on (#59D0E)
I Installed Ubuntu base and it boots to #, then I switch to root by doing su - . but I cannot modify any files as root, for instance, when I try to edit and save /etc/hostname , nano complains that it is a read-only filesystem.
I am guessing that during the installation I should have chowned the relevant directories under / like this:
Quote:
Now there are a bunch of directories under / :
Quote:
which ones should I set to be owned by root? should I also own the root dir like this:
Quote:
I also cannot modify any files under /home/user/ when I do su user ... should I do:
Code:chown -R user:user /home/user/
Or should I just do this:
Quote:


I am guessing that during the installation I should have chowned the relevant directories under / like this:
Quote:
chown -R root:root /bin /etc ... |
Quote:
bin boot dev etc home lib lib32 lib64 libx32 lost+found media mnt opt proc root run sbin srv sys tmp usr var |
Quote:
chown root:root / |
Code:chown -R user:user /home/user/
Or should I just do this:
Quote:
chown -R root:root / chown -R user:user /home/user |