in reply to running cgi as user other than nobody
Out of curiosity, what OS is this running on? As a sort of blind stab in the dark, I'd say having permissions at 0666 should be good enough, but I've run into similar problems with permissions myself. If the script is called by Apache, it's probably run as nobody - which will first require that nobody can write to the target directory. You might also consider explicitly chmod'ing the files to 0766 after you've written them - although this shouldn't be neccesary since generally who/whatever creates a file should own it.
Re: Re: running cgi as user other than nobody
by emilford (Friar) on Apr 02, 2002 at 00:25 UTC
|
I believe the script is being called by Apache, but then again, I'm not 100% sure. I have the directory set (for testing only) to 777 and the file I'm trying to modify is set to 666. I'm still not able to make any changes...always get a Permission Denied. I also get a Permission Denied error when trying to chmod the file from within the script. Could I be doing this wrong? | [reply] |
|
well if you can't chmod the file within the same script then I'd say you're overlooking something (hard to say without looking at the code). I've never actually seen an instance where something like this doesn't work:
...
open(FILE, ">$file") || die $!;
... [stuff]
close(FILE);
chmod 0666 $file;
Opening the file later might still be another issue... | [reply] [d/l] |
|