usbautocam only as root?

James Wilkinson james at westexe.demon.co.uk
Mon Aug 9 12:39:29 UTC 2004


RoboticGolem wrote:
> If you can get your script to work, you can put it pretty much
> anywhere (I suggest /usr/local/bin ) then chmod +s it and edit your
> rc.local file to call the script.  (sh /usr/local/bin/yourscript.sh if
> it is a bash script)

Um.

To the best of my knowledge, Linux doesn't honour the setuid bit
(chmod +s) on shell scripts. They're known to be a security
vulnerability, because the shell was never designed to run setuid
scripts securely. There are just too many potential holes, especially
if something goes wrong: a potential attacker might be able to do
something as root which he wasn't supposed to be able to do.

However, it doesn't matter in this case, since rc.local is run as root
anyway. It would make much more sense, though, to suggest chmod o+x to
make the script executable as root.

HTH,

James.
-- 
E-mail address: james@ | actor: (n) a piece of scenery that has the audacity
westexe.demon.co.uk    | to move once lit.





More information about the fedora-list mailing list