Page 1 of 1

How to delete remote file thorugh PHP

Posted: Fri Dec 26, 2003 3:23 am
by mskulkarni10
Hello,
I have problem in deleting the image on the remote server through PHP. Images is uploaded on the remote server through the servelt. When I tries to delete image using "Ulink", I got error "permission denied". I have serached for help on the web, and tried to use umask and chmod command. Still I am not able to delete file. I set the umask to "0777" and given the permission using "chmod". Still I am not able to delete the file.
The server is Sun server with solaris 5.9.

Cqan anybody knows abt it?

Thanks.

Posted: Fri Dec 26, 2003 1:23 pm
by AVATAr
who's the owner of that file? (chown)

Posted: Fri Dec 26, 2003 1:41 pm
by Weirdan
to delete the file you must have write permission on directory containing that file.

Posted: Fri Dec 26, 2003 1:59 pm
by Jim
I'm betting that when he uploads the image to the server, it's owner is set to 0 and it's permissions are set to 0.

Which means that the files can't be deleted by ANYone.

I'm not sure you can change permissions through PHP on a remote server.