That did write to the /tmp directory which also meant that my Perl
script wasn't looking int he current working directory but somewhere
else.  Modifying the script to use an explicit directory worked.
Thanks, Joshua!

On 6/6/07, Joshua Radke <josh at radkeland.org> wrote:
> Hrm ... okies.  Perhaps try:
>
> open (IPLOG,">>/tmp/ip.log") or die("could not create file");
>
> I guess I'm not certain what cwd() is in the context of mod_perl.  Any
> user should be able to stick something in /tmp, and using an explicit
> path will eliminate the possibility that there are permission issues.
>
> Donovan Niesen wrote:
> > Fedora Core 4 (stale I know, but attempts at upgrading in-place didn't
> > go so well).  SELinux is definitely disabled.
> >
> > On 6/6/07, Joshua Radke <josh at radkeland.org> wrote:
> >> What Distribution are you using?
> >> Is it be SELinux related?  (If so, get setroubleshootd, by any means
> >> possible!)
> >>
> >> Donovan Niesen wrote:
> >> > I have been troubleshooting a basic perl script that writes to a file.
> >> >  I'm able to run the script from the shell and the script creates the
> >> > file with no problem.  However when I run the same script from a
> >> > browser, it is unable to create the file.
> >> >
> >> > I'm running Apache with mod_perl enabled.  I've set chmod 777 on the
> >> > directory containing the script but still it cannot create a file.
> >> > I've tried creating the output file and giving it 777 permissions as
> >> > well, but the script will not append to it either.
> >> >
> >> > Here is the contents of script I've been testing with:
> >> >
> >> > #!/usr/bin/perl
> >> >
> >> > open (IPLOG,">>ip.log") or die("could not create file");
> >> > print IPLOG $ENV{'REMOTE_ADDR'}."\n";
> >> > close(IPLOG);
> >> >
> >> >
> >> > I feel like I'm missing something basic here...
> >> >
> >> >
> >> >
> >>
> >> _______________________________________________
> >> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> >> tclug-list at mn-linux.org
> >> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
> >>
> >
> >
>


-- 
Donovan Niesen