Hi there,
I am currently trying to create a file upload script for use with my site. I have everything working with regards to actually getting the file up onto the server and into the right directory etc, but every time I upload a file, it's set so that not being a superuser on the server, I can't overwrite it or delete it.
I've chmodded the destination directory as 777 but that didn't work and using PHP's chmod command after the file is uploaded doesn't work as it is already set so that only a superuser can modify it, so the script dies.
Any ideas on how to get around this?




so when you upload a file its owner is nobody, not you. You can try to run your php upload script as cgi, just place line below on the first line of your script and save as upload.cgi and set chmod 755, hope your host supports it. 

Bookmarks