remark:-rw-r--r--the first "-" does not count, three a group this is 644Second, use the chown command to change file owners in the shell, you can use the Chown command to change the file owner. The Chown command is the abbreviation for change owner (changing owner). It is important to note that the user must be in an existing system, which can only be changed to a user name that is logged in the/etc/passwd file. The Chown command has many uses, and you can modify the name of the user group directly by the way. Also, if you want to change the file owner at the same time as all subdirectories or files under the directory, add the-r parameter directly. Basic syntax: Chown [-r] Account name file or directory Chown [-r] Account name: User group name file or directory parameter:-r: Recursive (recursive) continuous change, that is, all files and directories under subdirectories are updated as this user group. Often used in situations where a directory is changed.Example 1:[[email protected] home]# Touch testfile //Create a file from the root user [[email protected] home]# ls testfile–l-rw--w--w-1 root root 0 June 7 19:35 testfileBoth the owner and owner level of the file are root[email protected] home]# chown yangzongde testfileModify file owner to Yangzongde[[email protected] home]# ls testfile-l-rw--w--w-1 yangzongde Root 0 June 7 19:35 testfileView the file owner as Yangzongde, but the group is still root http://blog.csdn.net/hudashi/article/details/7797393
Permissions for Linux files