0% found this document useful (0 votes)
15 views1 page

Sgid, Suid, Sticky Bit

Set UID (suid) allows users to execute commands with the permissions of the file owner, typically the root user, and is applied to files. Set GID (sgid) grants group ownership permissions to all users in a group and is applicable to directories. The sticky bit protects data in directories by preventing users from deleting files owned by others, and it is also applied to directories.

Uploaded by

bharathbabu2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

Sgid, Suid, Sticky Bit

Set UID (suid) allows users to execute commands with the permissions of the file owner, typically the root user, and is applied to files. Set GID (sgid) grants group ownership permissions to all users in a group and is applicable to directories. The sticky bit protects data in directories by preventing users from deleting files owned by others, and it is also applied to directories.

Uploaded by

bharathbabu2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Explain about set uid (suid)?

If we plan to allow all the users to execute the root users command then we
go for set uid (suid).
It can be applied for user level and is applicable for files only.
# chmod u+s <file name> (to set the suid on that file)
# chmod u-s <file name> (to remove the suid from that file)
# ls -l (if 'x' is replaced with 's' in owner's level permissions that
means suid is applied on that
file)
- r w s r w x r w x <file name> (here 's' is called set uid or
suid)
Example : # chmod u+s /usr/sbin/init 6 (then any user can restart
the system using this command #init 6)
# chmod u+s /sbin/fdisk (then any user can run the fdisk command)
# strings <command name> (to read the binary language of the command
ie., the string
command converts the binary language into human readable language)
# strings mkfs (to read the mkfs command's binary language into human
readable language)
* Normally set uid (suid) permission will be given on scripting files only.

43. Explain about set gid (sgid)?


If we plan to allow all the users of one group to get the group ownership
permissions then we go for
set gid (sgid). It can be applied for group level and is applicable on
directories only.
Example: # chmod g+s <directory name> (to set the sgid on that
directory)
# chmod g-s <directory name> (to remove the sgid from
that directory)

44. Explain about sticky bit?


It protects the data from other users when all the users having full
permissions on one directory.
It can be applied on others level and applicable for directories only.
Example : # chmod o+t <directory name> (to set the sticky bit
permission on that directory)
# ls -ld <directory name>
r w x r w x r w t <directory name> (where 't' is called
the sticky bit)

You might also like