Useful shortcuts for vi editor

Showing posts with label suid. Show all posts
Showing posts with label suid. Show all posts

Monday, 26 January 2015

What is SUID and GUID?

SUID (Set User ID on execution) and GUID (Group User ID on execution) that uses to give execution permission for running as owner of file.

example of activated suid 
passwd command;
ls -l /usr/bin/passwd
-rwsr-xr-x

example of activated guid 
wall command;
ls -l /usr/bin/wall
-r-xr-sr-x

info: "s" means that the file is activated for suid or guid.

to activate suid;
chmod u+s myfile.txt

to deactivate suid;
chmod u-s myfile.txt

to activate guid;
chmod g+s myfile.txt

to deactivate guid;
chmod g-s myfile.txt

You may also want to read this entry; http://ozsoyler.blogspot.com/2014/11/what-is-sticky-bit.html