Chmod command -- chmod755 and chmod4755 difference _ PHP Tutorial

Source: Internet
Author: User
The chmod command -- chmod755 differs from chmod4755. The difference between 755 and 4755 is that chmod is a command for setting file permissions in Linux. the following number indicates permissions of different users or user groups. Generally, there are three numbers: the first number represents the difference between 755 and 4755 in all files.

Chmod is a command for setting file permissions in Linux. the following numbers indicate permissions of different users or user groups.

Generally, there are three numbers:
The first number indicates the permission of the file owner.
The second number indicates the permissions of other users in the same user group as the file owner.
The third digit indicates the permissions of other user groups.

There are three types of permissions: Read (r = 4), write (w = 2), and execute (x = 1 ). In combination, there are also readable executable (rx = 5 = 4 + 1) and readable writable (rw = 6 = 4 + 2), readable and writable (rwx = 7 = 4 + 2 + 1 ).

Therefore, chmod 755 sets the user's permissions:

1. the file owner can read, write, and execute
2. other users in the same user group as the file owner can read and execute
3. other user groups can be read and executed

The difference between chmod 4755 and chmod 755 is that there is one more character at the beginning. this 4 indicates that other users have the same permissions as the owner when executing files.

For example, the root user has created an Internet authentication program netlogin. if other users want to use this program to access the Internet, the root user needs to run the chmod 755 netlogin command so that other users can run netlogin.

However, when executing netlogin, you may need to access some files that only the root user can access. other users may not be able to access the internet when executing netlogin due to insufficient permissions.

In this case, you can use chmod 4755 netlogin to set the permissions of other users to execute netlogin, so that they can access the Internet smoothly.

Cmdchmod is a command for setting file permissions in Linux. the following numbers indicate permissions of different users or user groups. Generally, there are three numbers: the first number indicates all the numbers in the file...

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.