Delete a file from a CGI
Steve Holden
steve at holdenweb.com
Fri Jun 1 07:12:13 EDT 2007
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_IRWXG))
> os.chown(".lock",pwd.getpwnam("nobody")[2],pwd.getpwnam("nobody")[3])
>
> but the CGI still can't delete the file.
>
> I will appreciate very much your help.
>
> Thanks a lot.
>
>
How was the file created in the first place? If you don't have
permissions to delete it you may well not have permissions to reown it
or change its permissions either!
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------
More information about the Python-list
mailing list