I'd like to discuss the uses and adavantages of SUID, GUID, and the sticky bit. I've just read that if SUID and GUID permissions are set, then the file is always run as the owner or the group respectively when the file is run by anyone. How does this effect security? Why is this dangerous? If the file can't be modified, then isn't it safe for it to run by any user? Furtheremore, what is the use of GUID? When is it an appropriate time to use this?
I've gotten two definitions on sticky bits. First definition statesThe second defintions statesQuote:
Setting the sticky bit tells Unix that once the concerned application is executed, it remains in memory.
After reading both of these definitions, I'm thinking that the latter one is more appropriate since /tmp has the sticky bit set. Obviously only the user can delete files or directories created there(other than root user). Any thoughts on these inquiries is greatly appreciated.Quote:
Sticky bit allows a user to delete the file that ONLY the user owns and non other within a directory. The sticky bit can only be set by the root user.