[Linux] The su command su cannot set groups operation not permitted in Linux is incorrect.

Source: Internet
Author: User

The following error occurs when executing the su command in Linux:
Su: cannot set groups: operation not permitted

This error is reported on the internet because the S bit of the/bin/su file is canceled, so the solution is chmod A + S/bin/Su.
After executing the command, I found that the su command is still unavailable,
View Details of the/bin/su File
[Root @ gc03vm12 ~] # Ll/bin/su
-Rwsr-Sr-x 1 nutch 28336 Sep 4 2009/bin/su
The user group is nutch and the permission is-rwsr-Sr-X;

On a normal machine, the following situations occur:
[Root @ gc04vm12 Home] # ll/bin/su
-Rwsr-XR-x 1 Root 28336 Jan 21 2009/bin/su
The user group should be root: Root
So I thought this could be the reason, so I modified it back.
[Root @ gc03vm12 ~] # Chown-r root: Root/bin/su
You still cannot use the su command to view the following information:
[Nutch @ gc03vm12 root] $ ll/bin/su
-Rwxr-XR-x 1 Root 28336 Sep 4 2009/bin/su
The permission is still different from the normal-rwsr-XR-X,
So proceed
Chmod A + S/bin/su
Then you can just
[Root @ gc04vm12 Home] # ll/bin/su
-Rwsr-XR-x 1 Root 28336 Jan 21 2009/bin/su

To sum up the cause: I mistakenly executed chown-r nutch: nutch/, and changed the/user group. This is a silly practice. Please never do so, which may cause some problems,
Although root can modify any file, some files in the root group cannot be changed to other groups, which may cause errors.

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.