In the last episode (Dec 13), Jason L. Schwab said: > Heya Folks; > > I came accross a file on a friend of mine's machine and I was > wondering how via chmod you could come up with the follow > permissions (ls -la on the file) > > -rwx--s--- > > I tried doing chmod u+rwx and then g+s but then I get -rwx--S--- and > it does not work correctly. The idea behind this is to have a shell > script that can be ran as suid by a group of people, but the actual > script code can not be seen.
When you do an ls, the setuid and executable bits get displayed on the same character position. setuid exec char ====== ==== ==== 0 0 - 0 1 x 1 0 S 1 1 s Try chmod u=rwx,g=sx. This doesn't work, though, since setuid bits on shell scripts do nothing. The kernel actually executes shell scripts as "/bin/sh command", so the setuid bit is never checked. Take a look at the "sudo" utility, which will let you do what you want. -- Dan Nelson [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message