The learning experience of Linux permissions----ll, chmod command detailed __linux

Source: Internet
Author: User
Tags chmod

ll command

Execute ll command (same ls-l), you can list the detailed information of the file, as shown below

1th column: The first word (file type-normal file "D is a folder") 9-bit permission (RWX (current user) rwx (user group) rwx (other user), if you do not have this permission to use-instead)

2nd Column: (quantity)

3rd Column: File owner

4th Column: File-owned user group (root belongs to root group)

5th column: File size


chmod command

1, Detailed:

(corresponding user) U: The owner of the file G: Group user o: Other users A: all Users--------"u (user), G (group), O (Other), A (All)" corresponding English

(appropriate permissions) r: File Read permissions (read) number code is 4,w: File Write permission (wrote) Digital code 2,x: File Execution authority The digital code name is 1,-: does not have any authority, the numeral code number is 0

2, as shown above, the Data folder has permissions of Rwxr-xr-x (the Hadoop user has read-R, write-W, execute-x permission (RWX)--------The HADDOP group has read-R, execute-X permissions (r-x)------------- Other users have read-R, execute-X permissions (R-x)

Add permissions: chmod o+w data to other users to add data file Write permission "where the parameter o corresponding user (for example, to the group of users to add permissions here is g), parameter w corresponding permissions (such as to increase the Read permission here is the parameter is R)" ———— Note: The plus sign represents increased permissions

Delete permission: chmod o-w data to other users to delete the Write permission of the data file "where parameter o corresponds to the user (for example, to give group users the right to add permissions here is g), parameter w corresponding permissions (such as to increase the Read permission here is the parameter is R)" ———— Note:

Digital notation: chmod data to the data directory read-R, write-W, execute-x permission, the group user rights are all deleted, the other user's permissions are deleted. —————— Note: 7 for r+w+x (4+2+1), such as to the data directory Hadoop users read, write, execute permissions, group users read and write permissions, other users read the permissions, as long as the implementation of the command chmod 764 data is OK.


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.