Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I have a script which runs as root, since it collects system info for healthchecks.
I'd like to run getcwd() on AIX as a different user than root, as a test for underlying mount-point permission problems.(getcwd returns undef if it cannot access the original mount-point) I have tried doing "$> = $< = $newuid", but I get "Operation not permitted". This is the case even if I try to use a binary wrapper to try avoid the problem where the O/S prevents setuid scripts. Any ideas, other than seperating the task entirely (which seems like a bad idea, security-wise) e.g. system("su - user -c /mycode/getcwd($targetdir)")? -oxbeef In reply to getcwd() as different user by 0xbeef
|
|