Permissions for Linux files and directories (Chown, chmod)

Source: Internet
Author: User

Chown, which is the change owner

Such as:

Hadoop-1.2.1.tar.gz the original owner as a Hadoop user, now change its owner to root:

========================================================================

chmod, which is the change mode

There are 10 properties for a Linux file or directory:

First is the first attribute, "horizontal line" represents the file, "D" represents the directory

The remaining nine attributes, divided into three groups, each set of three properties: Read (R), write (W), execute (x). These three groups represent the permissions of the owner of the file (directory), the permissions of the user with the group, and the other user's rights.

And the weights of the r,w,x are 4,2,1, respectively.

So 770 represents-rwxrwx---

Example:

Another way to change properties is to use symbols

U on behalf of the owner (user), G for the group User (group), O for other users (others), A for all users (all)

Example:

Permissions for Linux files and directories (Chown, chmod)

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.