The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



Thread: sticky bit??
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 02-05-2002
Perderabo's Avatar
Perderabo Perderabo is offline
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,355
I think that the question involves inode permissions rather than checking for which user is running the program.

And I think the OP got the sticky bit, suid bit and sgid bit confused since he set the sgid bit and then posted a question calling it the sticky bit while describing the behavior of the suid bit.

chmod 4775 file # set the suid bit
chmod 2775 file # set the sgid bit
chmod 1775 file # set the sticky bit

The suid bit causes an executable to assume the effective uid of its owner whenever it runs. But it only works with executables, not shell scripts. For awhile some kernels allowed it to work with shell scripts too, but this a major security hole.

To run shell scripts in an suid envirorment look at the freeware program called "sudo". It can do this securely.