[Tutor] CGI Video collection application File I/O troubles
patric at usa.net
Thu Dec 9 16:45:34 CET 2004
> Sorry for the delay but I was busy with soemthing else.
> The script prints the values of the variables fine in the
> browser so there must be a problem with the file writing part.
> When I run the script from my bash shell it creates the videodb
> database file, but when I run it from the browser it doesn't
> create no file whatsoever.
> At first I ran the script as a regular user and then I tried
> as root, I don't understand how the scripts writes the file
> from the shell when I am root but produces no output when
> I run it from the browser(as root also).
Just out of curiosity, does the directory where the file is to be written
have write permission for others?
Since the server (hopefully!) isnt running as root, not only the
destination file, but the directory where it is stored must have
permissions to allow everyone (or at least the user the server is running
as) to write there in the first place.
Also, did you check your webservers error log?
> > >
> > >
> > You know. I that is what happened to me once. I could not for the
> > life of me figure it out. I just chmod 777 it.
> The lady on the call box in Monkey Island 2
> Guybrush: I'm lost in the Inky Island Jungle in Monkey 2
> Lady: Just walk off the edge of the screen
> Tutor maillist - Tutor at python.org
More information about the Tutor