Jan Dworschak wrote:
Hi, hope i'm in the right list for that question, sorry if not ;)I'm writing a cgi-perl-script. In that I want to get access to an file on an Linux Server. The problem is that when I start it from the web-browser I run the script under the user of the web-server. But only the owner of the file has read and write permissions (rw-------) !!!So, I have to authorize me. How can I make that in Perl?
If you want to run a CGI script under a different user than what the web server runs as, you need to look at the suexec module that comes with Apache.
http://httpd.apache.org/docs-2.0/suexec.htmlOf course this will only work if you have full control of the Apache server. But since suexec is not configured already, and you can execute CGI scripts, I am assuming you are not hosting this on a shared box (all shared hosting environments that I know of use some sort of suexec like features), and you can make changes to the apache configuration to setup suexec.
Cheers,
Cees
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.