How linux changes the owner and ownership group of directory files
This article is about how linux changes the contents of directory file owners and ownership groups. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
In linux, it can be queried through ps and grep. Use ps aux | grep nginx in the following figure to query which account the nginx process is running under:
It can be seen that it is running under the www account. Then the owner and ownership group of the corresponding site root and its underlying file directory should be www, so that the site access will be normal.
Use ls-l to query the owner and ownership group of the file directory, as shown below:
Use chown to modify permissions: chown-R www.www / alidata/www/phpwind/ can change all files and directory ownership groups under the directory / alidata/www/phpwind to www accounts.
Thank you for reading! This is the end of this article on "how to change the owner and ownership group of linux directory files". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!