linux chown and chmod

 

1. The chown command
is used to change the owner or group of a file. The command is composed of the word change owner.
Example of use:
1. Change the owner of the file:
chown jim program.c
Change the owner of the file program.c to jim. As the owner, jim can use the chmod command to allow or deny other users access to program.c.
2. Change the owner of the directory:
chown -R john:build /tmp/src
Change the owner and group of all files in the directory /tmp/src to user john and group build
-R recursively change the specified directory and its subgroups The owner of all subdirectories and files of .
-v Displays the work done by the chown command.

 

Second, the chmod command
purpose: to change the access permissions of a file or directory.
For details, see: http://huangqiqing123.iteye.com/blog/2128857

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326936946&siteId=291194637