Posts

Showing posts from July, 2011

REBLOG!!! Sticky bit, suid and guid

I have to reblog this article in it's full just in case the original author removes it. Here is the original. http://bashscript.blogspot.com/2010/03/unixlinux-advanced-file-permissions.html Here in plain text to ** FORCE ** it into my rubbish layout. UNIX/Linux Advanced File Permissions - SUID,SGID and Sticky Bit After you have worked for a while with Linux you discover probably that there is much more to file permissions than just the "rwx" bits. When you look around in your file system you will see "s" and "t" $ ls -ld /tmp drwxrwxrwt 29 root root 36864 Mar 21 19:49 /tmp $ which passwd /usr/bin/passwd $ ls -l /usr/bin/passwd -rwsr-xr-x 1 root root 22984 Jan 6 2007 /usr/bin/passwd What is this "s" and "t" bit? The vector of permission bits is really 4 * 3 bits long. Yes there are 12 permission bits,not just 9.The first three bits are special and are frequently zero. And you almost always learn about the trailing 9 bits fir