[Tfug] What does the S Bit Mean in Linux?

Robert Hunter hunter at tfug.org
Mon Jan 1 15:28:14 MST 2007


> What does the S bit do in Linux?  This is excerpted from /bin:
>
> -rwsr-xr-x 1 root root   117887 2006-05-01 23:50 umount

It is the setuid bit.   The executable will run with effective uid of the
owner.  This allows programs that require the use of privileged
operations to be executed by non-privileged users.  For instance, if you
look at the "ping" program, you'll see that it is a setuid program, too;
this is because it uses ICMP.  As you may know, setuid programs can pose
a security risk, because if an attacker is able to exploit a flaw in the
code, he may then assume root privileges.

Other odd bits you might be curious about are the setgid bit, and the
sticky bit.

If you have info pages, take a peek at:

info coreutils chmod

-- 
Rob




More information about the tfug mailing list