About permissions issues for files under Linux

Source: Internet
Author: User

Today, when the startup file in the Linux update Service, copy the updated boot file directly, error: Can ' t be execute

After thinking of the following out of the file details found in the copy of the past execution file is-r--r--r--(indicates that only read-only permissions, cannot be performed).

Thinking of this, I used chmod 755 hpcenter (file name) command to modify the permissions of the file-rwxr-xr-x, the file can be executed.

It was done, but found out that the other file file permissions are-rwxr-sr-x, have an S permission, and my is X permission,

After searching the relevant information on the Internet, it is found that s is a special permission, set up the program file of Suid, when the user executes the program, the user's permission is the master of the program file.

For example, the owner of a program file is root, and the user who executes the program will temporarily gain access to the root account. Sgid is similar to suid, except that the permissions of the file group are obtained when the program is executed.
You can take a look at passwd this command program's permission settings, it is set suid permissions. The setting method is: chmod u+s filename (suid) chmod g+s filename (sgid).

About permissions issues for files 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.