Significance/reason of using SUID, SGIDand Sticky bit ?
hi there,
what is the reason/significance of using SUID, SGID and Sticky Bit ? the concept is not clear to me. can anyone pls make me understand the concept of using those ?( if possible..with example ?) thanx.. |
An example of a program that has the SUID bit set is "passwd". This allows a user to change their own password, which is stored in a file that is only writable by root.
The sticky bit is set on world writable directories. It prevents a user from deleting a file that they don't own. The directory itself is a file, and since the directory is world writable, a user would otherwise be able to delete the file. An example is the /tmp directory. ls /tmp -l -d drwxrwxrwt 31 root root 1200 2006-03-23 04:37 /tmp SGID programs will make your effective gid the same as the program. It is more usefull in a multiuser environment to allow access to files by all members of a group. |
Toffe,
This link have explanation SUID, SGID and Sticky bit with examples. hope it helps you. http://www.expertslogin.com/linux-ad...bit-suid-guid/ |
I use SUID for "halt" and "reboot" so I don't need sudo before them.
|
All times are GMT -5. The time now is 06:04 AM. |