[olug] Perl CGI Priveledge elevation

Brandon Lederer blederer at cashflowbilling.com
Tue Sep 2 16:07:30 UTC 2003


I have a perl script that runs on my webserver (as the web user).  I 
need it to dig in the email directories (that arent world readable).  
What I need to accomplish this is security elevation to my email user.  
how can I execute an ls -l for instance on a directory from within my 
perl script, as another user (w/o typing in their password)  I tried the 
SetUID/GID bits, and it said could not SetUID when I ran it.  I'm okay 
(though it isnt smart) w/ hardcoding a password in the perl script, but 
i cant execute su <user> -c <command> and provide the password for that 
user, to my knowledge.  Help Anyone?


More information about the OLUG mailing list