LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   wierd cgi problem (https://www.linuxquestions.org/questions/linux-networking-3/wierd-cgi-problem-330153/)

ruwach 06-03-2005 10:47 PM

wierd cgi problem
 
Hello all.
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?
Edit/Delete Message

j-ray 06-04-2005 05:03 AM

why dont u chmod 0777 the new created file after creation? this will probably solve the problem.

ruwach 06-04-2005 07:15 AM

sounds cool -
i guess i will have to write that into the script just after the file is created so i can open it and read from it.
i just dont get why it creates a file, writes to the file, but the next script can not write to it.

thanks

j-ray 06-04-2005 07:46 AM

web servers tend to be restrictive in the use of cgi-bins and probably change the ownership of the new file to someone else than the ususal apache user. if u connect to the server with an ftp client u may see who's the owner of the file.
i dont know how to execute system programs in python. in perl u take
system 'myprog -arg'; (or exec)
i guess it's the same in python?

ruwach 06-04-2005 11:39 AM

yep a little different in python, but it worked
thanks
:)


All times are GMT -5. The time now is 04:15 AM.