Article 59D0E Which directories should be owned by root?

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:
chown -R root:root /bin /etc ...
Now there are a bunch of directories under / :

Quote:
bin boot dev etc home lib lib32 lib64 libx32 lost+found media mnt opt proc
root run sbin srv sys tmp usr var
which ones should I set to be owned by root? should I also own the root dir like this:

Quote:
chown root:root /
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:
chown -R root:root /
chown -R user:user /home/user
latest?d=yIl2AUoC8zA latest?i=0PcAFY4p02I:Z3RIAU_AH7E:F7zBnMy latest?i=0PcAFY4p02I:Z3RIAU_AH7E:V_sGLiP latest?d=qj6IDK7rITs latest?i=0PcAFY4p02I:Z3RIAU_AH7E:gIN9vFw0PcAFY4p02I
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments