PDA

View Full Version : [SOLVED] What is the s protection bit in a file?



Griff
December 7th, 2007, 08:05 PM
For example when you run:

ls -l /usr/bin/passwd
to view the protection bits of passwd there is an s in the owner permission area. What is that? I thought there was only r, w, or x?
Here it is:

-rwsr-xr-x 1 root root 29104 2006-12-19 15:35 /usr/bin/passwd

aks44
December 7th, 2007, 08:19 PM
When in the first rwx group (the one which corresponds to the owner user), S is the setuid (http://en.wikipedia.org/wiki/Setuid) bit. In the second rwx group (owner group) it is the setgid bit.

When the file has both x and S, s is displayed. If the file doesn't have x, S is displayed.

Griff
December 8th, 2007, 07:54 AM
Ah! Thank you! I googled and searched but couldn't find anything relating to this. :)