Forum Moderators: coopster

Message Too Old, No Replies

Operation not permitted. can't delete directory

         

SNOWmanx

8:09 pm on Sep 24, 2005 (gmt 0)

10+ Year Member



I made a script that's supposed to delete a directory, but the operation isn't permitted. When I try to chmod the file that's deleting the directory to 777, an Internal Server Error appears. I'm using unlink() to destroy my directory. The folder is 777.

jatar_k

9:28 pm on Sep 24, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you can't use unlink on a directory it is only for files. you must use rmdir() [php.net] to remove a directory.

keep in mind the directory must be empty and the user trying to delete must have the appropriate permissions to do so.