A: setuid:
Set to the file of the two methods SetUID
1. chmod 4755 filename
2. chmod u + s filename
SetUid file permissions canceled
1.chmod 755 filename
2. chmod u-x filename
Two: setgid
1. When the executable file has setgid permission, i.e. -rwx-rs-rx i.e. x is replaced with the group permissions s; -rwx-rs-rx
When the user to execute the command, it is the embodiment of a member of the group, the group has permission to sink.
2. When the directory has setgid permission, drwx-rs-rx, when a user creates a file in the directory, the file or directory belongs to the newly created group all have the directory setgid
The group belongs.
Set to the file of the two methods SetGID
1. chmod 2755 filename
2. chmod g + s filename
SetUid file permissions canceled
1.chmod 2755 filename
2. chmod g-x filename