简体   繁体   中英

Change ownership of linux directory

Hi I'm very new to Linux..

Once I have changed ownership of /usr my sudo command failed working ..

Once I changed ownership of /var some other things broke ..

1: I just want to know which are folders where one should never change it's default ownership..

2: what if someone gets permission_denied for /var during installing some packages .. chmod or chown should be used ...

I would never change the ownership in folders unlike /home/* /opt/ . Sometimes you have to change the owner if you put your own stuff to /etc/ , but you should now what to do.

To install software, even in Ubuntu use the provided tools, 'apt' and 'dpkg' for example. Often the installation needs root rights. Give them with the usage of and additional 'sudo'.

# f.e. installation of a command line browser
sudo apt install w3m

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM