644, 755, and 777 permissions in linux, 644777

Source: Internet
Author: User

644, 755, and 777 permissions in linux, 644777

Detailed description of linux 644, 755, and 777 Permissions

Common linux File Permissions:

444 r --

600 rw -------

644 rw-r --

666 rw-

700 rwx ------

744 rwxr -- r --

755 rwxr-xr-x

777 rwxrwxrwx

From left to right, 1-3 digits represent the permissions of the file owner, 4-6 digits represent the permissions of users in the same group, and 7-9 digits represent the permissions of other users.

The specific permissions are represented by numbers. The read permissions are 4, r, 2, w, and 1, represented by x;

Through the combination of 4, 2, and 1, the following permissions are obtained: 0 (no permission); 4 (read permission); 5 (4 + 1 | read + execution ); 6 (4 + 2 | read + write); 7 (4 + 2 + 1 | read + write + execute)

Take 755 as an example:

1-3 bits 7 equals to 4 + 2 + 1, rwx. The owner has read, write, and execute permissions;

4-6 digits 5 equals to 4 + 1 + 0, r-x. users in the same group have read and execute permissions, but do not have write permissions;

7-9 digits 5. Same as above, it is also r-x. Other users have read and execute permissions but do not have write permissions.

Rwx permission numerical explanation

Chmod can also use numbers to indicate permissions, such as chmod 777 file.

Syntax: chmod abc file

Each a, B, and c is a number, indicating the permissions of the User, Group, and Other respectively.

R = 4, w = 2, x = 1

If you want the rwx attribute, 4 + 2 + 1 = 7;

If the rw-attribute is required, 4 + 2 = 6;

If you want the r-x attribute, 4 + 1 = 7.

Example:

Chmod a = rwx file

And

Chmod 777 file

Same effect

Chmod ug = rwx, o = x file

And

Chmod 771 file

Same effect

If chmod 4755 filename is used, the program can have root permissions.

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.