You are on page 1of 6

1

1
SUID

SUID stands for Set User ID.


SUID allows applications to run by normal user
with privileges of root user.
That means in case I have an application (eg.
ping) whose owner is 'root' and it has its SUID bit
set, then when I run this application as a normal
user, that application would still run as root.
By default the SUID will be applied on ping so that
the normal users will also can ping to other
systems.

2
Example

Comp1 Comp2
192.168.0.1 192.168.0.2
Administrator

Comp3 Comp4
192.168.0.3 192.168.0.4

3
SUID commands

To
Toremove
removeSUID
SUID
[root@comp1
[root@comp1~]#chmod
~]#chmod 0755
0755 /bin/ping
/bin/ping

To
Toadd
addSUID
SUID
[root@comp1
[root@comp1~]#chmod
~]#chmod 4755
4755 /bin/ping
/bin/ping

11

4
SGID

SGID is used for group inheritance, when


SGID is applied to a directory, all sub directories
& files created by any user in that particular
directory would be owned by the specified
group, regardless of user s group.

20

5
Sticky Bit

Sticky bit is used to restrict others from


removing the files/dir s. When applied only
owner of that particular file/dir can delete them.
Root / Superuser can also remove them, even if
it is applied.

21

You might also like