Permissions for Linux files

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.