Click to See Complete Forum and Search --> : another cgi question....


mychl
06-14-2002, 02:29 PM
Ok, I've got my script working from the command line, however, when it's activated via the web, it doesn't work, it's a permission problem.

How can I;

1: Set up the perl script to run as root, or

2: Be able to change permissions of the files from within the script?

I've tried already to

my $mode = 0777;

foreach $file (@files)
{
chmod $mode $file
}

Which works on *.html files but not thumb* files....

:confused:

Thanks

Whipping Boy
06-14-2002, 08:21 PM
Originally posted by mychl:
<STRONG>Ok, I've got my script working from the command line, however, when it's activated via the web, it doesn't work, it's a permission problem.

How can I;

1: Set up the perl script to run as root, or
</STRONG>
Bad idea
<STRONG>
2: Be able to change permissions of the files from within the script?

I've tried already to

my $mode = 0777;

foreach $file (@files)
{
chmod $mode $file
}

Which works on *.html files but not thumb* files....
</STRONG>

The files have to be owned by the same user as the web server is running as in order to change their permissions.