Linux command SU performs the following error
Su:cannot set Groups:operation not permitted
This error was said on the Internet because the/bin/su file was canceled, so the solution was chmod a+s/bin/su
I still can't use the SU command after I execute the command,
View details of the/bin/su file
[Root@gc03vm12 ~]# Ll/bin/su
-rwsr-sr-x 1 nutch nutch 28336 Sep 4 2009/bin/su
The Discovery User Group is nutch, the authority is-rwsr-sr-x;
And a normal machine is the following situation
[Root@gc04vm12 home]# Ll/bin/su
-rwsr-xr-x 1 root root 28336, 2009/bin/su
The user group should be root:root
So I guess that's probably the reason why I changed it back
[Root@gc03vm12 ~]# chown-r Root:root/bin/su
You still cannot use the SU command to view the following conditions
[Nutch@gc03vm12 root]$ Ll/bin/su
-rwxr-xr-x 1 root 28336 Sep 4 2009/bin/su
Discovery permissions are still different from normal-rwsr-xr-x,
So continue to execute
chmod a+s/bin/su
And then it's okay.
[Root@gc04vm12 home]# Ll/bin/su
-rwsr-xr-x 1 root root 28336, 2009/bin/su
Summary reason: I mistakenly executed chown-r nutch:nutch/, change/user group, this is a stupid practice, please do not do so, this will lead to some problems,
Although root can modify any file, it is not possible to change some files that belong to the root group to another group, which can cause errors.