File Rights Management under Linux

Source: Internet
Author: User

There are two levels of rights management

First Tier User: File Owner (u), group user (g), Other (O)

Second layer differentiated permissions: Read (r), write (W), executable (x)

These two levels constitute a two-dimensional structure for file rights management

U g o

R

W

X

In practice, we use 9 bit bits to represent the values of the nine positions in this table, respectively.

It's three digits in octal.

So the most common to chmod 777 filename

The meaning of 777 is to put all nine of the above lattice 1: All users have read/write/execute permissions

There are three more unpopular modes: S_isuid s_isgid, sticky (sticky) bit

The top two allows the user to have the file owner's permission when the file is executed, and the last to make the file as permanent as possible (it makes little sense under the virtual Storage Management framework)

chmod command:

chmod u+x filename

where the first u, representing the user of the operation, is currently in the modification of WHO's access rights: U (file owner), O (Other), G (Group user) or a (all the users)

The second is the operator: + (add specific permissions),-(remove specific permissions), = (Assign to specific permissions)

The third is permission: R, W or x, which can be combined.

File Rights Management under Linux

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.