Linux directory or file permissions

Source: Internet
Author: User

Linux directory or file permission character parsing drwxr-xr-x

With Ls-l, you can view information such as the time and size of permissions for a directory or file.

Permissions occupy 10 characters, eg: "drwxrwxrwx" format: "Directory Tag" + "Owner action rights" + "owner's group member operation Rights" + "other people operation rights" 1. " Directory Tag ": If it is directory ' d ' otherwise '-' 2."owner action Rights" and "owner's group members operation Rights" and "other people operation permissions" Each segment is 3 bits per paragraph readable (r) + writable (W) + executable (x)such as writable (bit) is no, that is not writable, then use '-' instead, eg:-rwxr-xr--: This is a file (-), the owner has "read and write Execution" permission (RWX), the group members have "reads Execute" permission (r-x), other users only "Read permission" (r--) 3. If you want to modify permissions, You can use the chmod command, the permission can be "number" can also be expressed in "character"A. Numbers indicate permissionsexecutable: 1Writable : 2Readable: 4permissions can be added to represent, such as read-write but no execute permission is "6" = 4+2, if read-write execution is "7" =4+2+1B. According to the description of part A to give a file all permissions can be used 7, also need three paragraph to indicateEg:chmod 754 test.shindicates that the owner has full permissions (7=4+2+1), the group member has read and Execute permissions (5=4+1), and the other user has only the readable permission (4)

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.