-   Linux - Software (
-   -   Sticky bit (

fakie_flip 10-31-2012 08:14 AM

Sticky bit
1 Attachment(s)
In the screenshot, the guy gives the command

chmod 1770 RandR

That gave the RandR directory permissions


I noticed that /tmp has a lowercase t. What is the difference?

Also, since that T is taking the place of write permission for all other users, how would a user know that others do not have the write permission? The chmod 1770 RandR means it does not, but if a user only saw the file permissions, how would you know whether others had write permissions or not?

pvanstam 10-31-2012 09:44 AM

mars:tmp $ chmod 755 test
mars:tmp $ ls -ald test
drwxr-xr-x 2 pim staff 68 31 okt 15:17 test

mars:tmp $ chmod 1755 test
mars:tmp $ ls -ald test
drwxr-xr-t 2 pim staff 68 31 okt 15:17 test

mars:tmp $ chmod 1750 test
mars:tmp $ ls -ald test
drwxr-x--T 2 pim staff 68 31 okt 15:17 test

Capital T is to indicate the x-bit is missing. See?

Reuti 10-31-2012 09:48 AM

NB: In a similar way you can get an uppercase S for suid and sgid bits in case x is missing.

pvanstam 10-31-2012 09:55 AM

BTW: the last bit is the other's-'x'. This is not the "write", but the execute bit. For files it means you may execute it (scripts and executables). For directories it means you may traverse into the directory. If you may see contents of the directory depends on the 'r' (read) bit.

All times are GMT -5. The time now is 10:30 PM.