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.