Re: Delete a file from a CGI

2007-06-04 Thread Steve Holden
t;permission denied" OSError >>> os.remove(".lock") >>> >>> I've seen that the script is running as "nobody", but, the file is rwx by >>> everybody. I've also tryed changing the owner of the file to "nobody" >>>

Re: Delete a file from a CGI

2007-06-02 Thread Matias Surdi
script is running as "nobody", but, the file is rwx by >> everybody. I've also tryed changing the owner of the file to "nobody" >> also, but no luck anyway. >> >> Thanks a lot. >> >> >> Steve Holden wrote: >> >>&

Re: Delete a file from a CGI

2007-06-01 Thread Steve Holden
e("") > lock_file.close() > # But the following line raises a "permission denied" OSError > os.remove(".lock") > > I've seen that the script is running as "nobody", but, the file is rwx by > everybody. I've also tryed changing the owner

Re: Delete a file from a CGI

2007-06-01 Thread Matias Surdi
r os.remove(".lock") I've seen that the script is running as "nobody", but, the file is rwx by everybody. I've also tryed changing the owner of the file to "nobody" also, but no luck anyway. Thanks a lot. Steve Holden wrote: > Matias Surdi wrote: &g

Re: Delete a file from a CGI

2007-06-01 Thread Gerardo Herzig
When you execute a cgi, the program runs under the "apache user" (ussualy www or wwwrun or so), so THAT user needs permissions for deleting the file. Other approach could be suid'ing the cgi program. Gerardo >HI! > >I want to delete a file from a CGI, but I always

Re: Delete a file from a CGI

2007-06-01 Thread Steve Holden
Matias Surdi wrote: > HI! > > I want to delete a file from a CGI, but I always get a Permission denied > error. > > I've tryed this after creating the file (from a normal script): > > os.chmod(".lock",stat.S_IMODE(stat.S_IRWXU | stat.S_IRWXO | stat.S_

Delete a file from a CGI

2007-06-01 Thread Matias Surdi
HI! I want to delete a file from a CGI, but I always get a Permission denied error. I've tryed this after creating the file (from a normal script): os.chmod(".lock",stat.S_IMODE(stat.S_IRWXU | stat.S_IRWXO | stat.S_IRWXG)) os.chown(".lock",pwd.getpwnam("nobody