Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

file permissions and CGI scripts

by indapa (Monk)
on Apr 28, 2001 at 03:06 UTC ( #76298=perlquestion: print w/replies, xml ) Need Help??

indapa has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am trying to run a CGI script and I keep getting the following message displayed on my browser (I am using the handy CGI::Carp qw(fatalsToBrowser) method.
Software error: Permission denied
But when I my script from the command line I get no problems. I did a chmod 755 on my script and it did not help. When I run my script from the command line I get no problems, but I think ownership/permission is perhaps different when running it from the command line. I'm not sure what else to do, any comments would be appreciated.

Replies are listed 'Best First'.
Re: file permissions and CGI scripts
by tinman (Curate) on Apr 28, 2001 at 03:13 UTC

    Your webserver probably (most certainly) does not have the same permissions as you do.. Webservers run under the user nobody or a similarly low power account..

    Check to see the user/group that the webserver is running (in Apache, httpd.conf has this or defaults to nobody:nobody)..
    Change the CGI script ownership to your webserver account (best course), and make sure the access permissions are set right as well
    HTH

Re: file permissions and CGI scripts
by isotope (Chaplain) on Apr 28, 2001 at 03:11 UTC
    Is your script trying to access another file somewhere to which you might have sufficient permissions, but the webserver does not?

    --isotope
    http://www.skylab.org/~isotope/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://76298]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2019-12-09 14:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?