How to use Chown to modify user attributes in Linux
Linux how to use Chown to modify user attributes, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
Chown modifies the user and user group properties of files and folders
1, to modify the owner of the file hh.c. It is owned by the user who changed it to sakia.
Chown sakia hh.c
This applies the user access of hh.c to sakia as the owner
2. Change the owner and group of the directory / tmp/sco to sakia and group net
Chown-R sakia:net / tmp/sco
Chmod modifies read-write execution properties of files and folders
1. Modify the hh.c file to be writable, readable and executable
Chmod 777 hh.c
To modify all file attributes in a directory to be writable, readable and executable
Chmod 777 *. *
Replace the folder name and suffix name with *.
By the same token, if you want to modify the properties of all htm files
Chmod 777 * .htm
2. Modify the directory / tmp/sco to be writable, readable and executable
Chmod 777 / tmp/sco
To modify all folder properties under a directory to be writable, readable and executable
Chmod 777 *
Just replace the folder name with *.
To modify the properties of all files and folders and their subfolders under / tmp/sco to be writable, readable and executable
Chmod-R 777 / tmp/sco
Writable wish4
Readable riter2
Executable xroom1
777 is full access. You can freely combine the permissions of users and groups as needed.
After reading the above, have you mastered how to use Chown to modify user properties in Linux? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!