I put a script on my own cgi python server. When I ssh to this host and run the mkdir script, it works fine. However, when I call this command from a .py on the web it doesn't work. Im not sure how to fix this. Is this a permissions issue? Every other file i/o seems to work. Does anyone know what the problem might be?
problem with python's os.mkdir in cgi test
Page 1 of 14 Replies - 3461 Views - Last Post: 13 November 2006 - 06:38 PM
Replies To: problem with python's os.mkdir in cgi test
#2
Re: problem with python's os.mkdir in cgi test
Posted 13 November 2006 - 02:12 PM
it may also be a user issue, CGI scripts will run as the webserver user, not the user you ssh'ed in with.
So yeah check permissions and owership
So yeah check permissions and owership
#3
Re: problem with python's os.mkdir in cgi test
Posted 13 November 2006 - 02:57 PM
can you explain that? Im not so well versed in Unix. The computer is an old computer at my school running Unix. I ssh'd as my username and what not. The files I ran on the computer via ssh and the files I ran on the net via cgi are in the same directory. how do i change my user stuff to be able to run the cgi? Sorry, im sort of a newb.
#4
Re: problem with python's os.mkdir in cgi test
Posted 13 November 2006 - 03:18 PM
well, it kinda makes a security hole such that anyone could write files to that folder.
You may want to rethink your approach to the problem.
Otherwise to make the folder world writeable, where anyone on the system can do what ever to those files, its chmod 777 foldername
You may want to rethink your approach to the problem.
Otherwise to make the folder world writeable, where anyone on the system can do what ever to those files, its chmod 777 foldername
#5
Re: problem with python's os.mkdir in cgi test
Posted 13 November 2006 - 06:38 PM
thats odd. i tried to chmod it before but it didnt work. that was with slightly different code. is there any chmod setting that would allow me to write to the directory without letting others do so? i know with apache i could use .htaccess. unfortunately until i get my own hosting that is impossible.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|