[NTLUG:Discuss] SETUID on Shell Scripts Question
Mike Owens
owensmk at earthlink.net
Mon Apr 3 00:28:37 CDT 2000
This is an embarassing question, but I evidently am not getting it. I
have a simple shell script which I have setuid to root. All it does it
take md5 sums on everything in /usr/bin. Yet when I run it as a plain
old user, I get "permission denied" on the binaries which don't have
group or user read permissions.
Why is the happening? If I run it as root---no problem. I thought suid
was supposed to make it execute as root (assuming it is owned by root).
I read in the bash man pages to use the -p switch as well. Still, no
avail.
I guess my shell is executing the script, and thus using its uid and
guid. How do I set permissions such that this won't happen?
Anyone?
More information about the Discuss
mailing list