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

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?