wierd cgi problem
i have a strange problem with some python cgi scripts.
the deal is.....
i keep loosing permission to write to a file created by a cgi script.
the file is created in a directory created by a python script. but after the file is created by the cgi script,
another script in the same folder cannot open it to write to. think that its a permissions issue.
the thing is, all of it works on my Arch linux computer,
but it doesn't work on my Ubuntu computer.
same folders, same everything (except http.conf) because debian sets up its modules differently.
how come it will create the directory, create the files, but not let me go back into the file to edit?
any suggestions? what could be different? from one computer to the next?
What are the file permissions on the directory?
(ls -la /path/to/directory)
the main directory where the files are to be written to and from is owned by my username -drwxrwxrwx
the directory in that directory that the script created is
owned by www-data drwx----------
the file created in that directory is also owned by www-data
and is -rw-r-r-----
hope this helps.
Interesting. Is www-data the use apache runs as? If it is, then that should be fine. However, try making the file world read-writeable (chmod a+rw filename), and see if that helps.
do you mean chmod a+x the file and directory that the script creates ? or if i do that to the directory that the file goes in, will that work for everything in it ?
No - you don't want to make it executable (+x) you want +rw. Do it to the directory, and to the file.
Edit: NOTE - the directory will have to be +x, otherwise nothing can access the files in it.
Comments on this post
Last edited by SimonGreenhill; June 4th, 2005 at 08:54 AM.
Done ! and we are rolling now.
thanks so much
you saved me from pulling all of my hair out !