print "USER: ". getpwuid($<) . "\n";
USER will be root, but when I do a ps -ef it does:
Sure it is, because $< is the real uid (you used to be root).
Use the effective uid $> to display the new identity. See perlvar.
Cheers, Sören
In reply to Re^3: Running a daemon process as another user
by Happy-the-monk
in thread Running a daemon process as another user
by toadi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |