Linux special Rights Management from Android FastBoot no permissions: SUID, SGID, Sbit

Source: Internet
Author: User

Preface

The reason is that these special permissions, because fastboot this command seems a bit of convulsions, giving the feeling is sometimes can not be used, the execution of FastBoot devices error Tips :

No permissions


In order to find out the cause of the problem, I thought about it.


This problem typically occurs in the following 2 scenarios:

1. Copy and use the new FastBoot executable file

2. Change the environment variable of fastboot executable file


Why do the above 2 scenarios produce such errors?

Which fastbootll FastBoot

after the execution of these two commands, it is evident that the original copy or use of other people copied fastboot, resulting in fastboot belong to the user and group has changed, so that suid and Sgid invalid , because the original fastboot belongs to the user and the group is root.

Next we will briefly understand the SUID and sgid failure resulting in no permissions behind the knowledge points.

SUID

Set UID, it will appear in the file owner permissions of the execution bit, only valid for the binary program, the performer needs to have X permission for the program , in the process of running the program, the performer owns the permissions of the owner of the program.

For example: Normal User Execution fastboot and passwd commands .

Here again, many of the root tools on Android are through a number of vulnerabilities (such as buffer overflow, etc.) to attack some with suid or Sgid permissions, and belong to the user or user group is the root of the binary program to temporarily get root permissions, Then execute a pre-compiled malicious target platform code to achieve root purpose.

SGID

Set GID, which appears on the execution bit of the group permissions to which the file belongs, is valid for both files and directories , as follows:

1. For file

For the binary program is useful, the program performer to have X permission, the performer in the execution process will get the program User group permissions ( equivalent to temporarily joined the program's user group )

2, for the directory

The user has the RX permission to the directory to enter the directory, after the user enters this directory, the effective user group becomes the user group of the directory, if the user has WX permissions in this directory, then the user created the user group of the same directory user group.

Sbit Sticky bit, which appears on the execution bit of other user rights , is only valid for the directory , and when the user has WX permissions on the directory, the user creates the file or directory in that directory, Only users and root can delete them.



A small problem behind will also hide some of the more important points of knowledge, good at discovering and summarizing, there is always some harvest.

Finally, this issue is recorded, hoping to help the following students encounter similar problems.


Linux special Rights Management from Android FastBoot no permissions: SUID, SGID, Sbit

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.