I've never done much in the way of cgi scripts before, and am just getting
started with it. I have encountered what seems to be a permissions problem,
which I can't work out how to solve. I'm hoping someone can help me.

I have a very simple test case:

#!/usr/bin/perl
use strict;
use warnings;
print "Content-type: text/html\n\n";
print "<html><head></head><body>\n";
open my $f, '>', 'test.txt' or print "$!\n";

When I run this script on the server: > test.cgi, the test.txt file is
created. However when I use a browser as a client to execute the script, it
prints the $! OS_ERROR "Permission denied" and the test.txt file is not
created.

The script has the permissions mask: '-rwxr-xr-x' and the directory has the
permissions mask 'drwxr-xr-x'.

Myf White
mailto:myfwh...@gmail.com

“Sometimes your joy is the source of your smile, but sometimes your smile
can be the source of your joy." Thich Nhat Hanh

Reply via email to