In just checked the httpd.conf file and, yes, the user/group is set to
www/www. So I need to change it to what?

Mark

----- Original Message ----- 
From: "Paul Hoffman" <[EMAIL PROTECTED]>
To: "John Delacour" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, September 25, 2003 5:23 AM
Subject: Re: File write/read problem


> On Wednesday, September 24, 2003, at 10:44 PM,
> [EMAIL PROTECTED] wrote:
>
> > OK, that makes perfect sense, but it is not working here. Here is a
> > basic script which, when run, should create a new file called
> > example.txt because it is not there when the open statement is used.
> >
> > #!/usr/bin/perl
> >
> > print "Content-type: text/html\n\n";
> >
> > print "Creating new file...";
> >
> > my $newtext = "newtext from old";
> >
> > open (USER,"> example.txt");
> > print USER $newtext;
> > close USER;
> >
> > exit;
> >
> > As you've said, it should create the file in the same directory, in
> > this case the cgi-bin, as the script (which is called write.cgi). I
> > run the call the script from the browser and the script runs fine,
> > except, no file is created. I added a "|| die ($!)" at the file open
> > call and add the CGI::CARP qw(fatalToBowser) at the top and get the
> > following.
> >
> > Permission denied at /Library/WebServer/CGI-Executables/write.cgi
> >
> > All the permissions for each of these directories are 755. Something
> > is a miss. So what can I do?! I'm very confused.
>
> Who owns the directories?  The Web server runs as user www (unless
> you're not running the stock httpd).  That's probably your problem.
>
> HTH,
>
> Paul.
>
> --
> Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan
> [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/
>

Reply via email to