4 Replies - 3872 Views - Last Post: 13 November 2006 - 06:38 PM Rate Topic: -----

#1 velcrobandits  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 6
  • Joined: 13-November 06

problem with python's os.mkdir in cgi test

Posted 13 November 2006 - 01:43 PM

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?
Is This A Good Question/Topic? 0
  • +

Replies To: problem with python's os.mkdir in cgi test

#2 Nova Dragoon  Icon User is offline

  • The Innocent Shall Suffer, Big Time
  • member icon

Reputation: 36
  • View blog
  • Posts: 6,169
  • Joined: 16-August 01

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
Was This Post Helpful? 0
  • +
  • -

#3 velcrobandits  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 6
  • Joined: 13-November 06

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.
Was This Post Helpful? 1

#4 Nova Dragoon  Icon User is offline

  • The Innocent Shall Suffer, Big Time
  • member icon

Reputation: 36
  • View blog
  • Posts: 6,169
  • Joined: 16-August 01

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
Was This Post Helpful? 0
  • +
  • -

#5 velcrobandits  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 6
  • Joined: 13-November 06

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1