pneudralics Posted September 12, 2009 Share Posted September 12, 2009 I keep getting permission denied error for my rmdir(). All files are deleting but when trying to delete the directory afterwards I keep getting errors. function EmptyDir($search_dir) { $handle=opendir($search_dir); while (($file = readdir($handle))!==false) { @unlink($search_dir.'/'.$file); } closedir($handle); rmdir($search_dir); //Delete directory } EmptyDir($search_dir); //Warning: rmdir(../../gallery/fdfgdfg) [function.rmdir]: Permission denied //Directory:fdfgdfg Quote Link to comment https://forums.phpfreaks.com/topic/174028-keep-getting-error-when-trying-to-delete-directory/ Share on other sites More sharing options...
Maq Posted September 12, 2009 Share Posted September 12, 2009 Well what are the permission on the directory and who's the owner? Quote Link to comment https://forums.phpfreaks.com/topic/174028-keep-getting-error-when-trying-to-delete-directory/#findComment-917365 Share on other sites More sharing options...
pneudralics Posted September 12, 2009 Author Share Posted September 12, 2009 Well what are the permission on the directory and who's the owner? Permission when created is 777. I'm not understanding the owner part. This is all on WAMP on my computer. Quote Link to comment https://forums.phpfreaks.com/topic/174028-keep-getting-error-when-trying-to-delete-directory/#findComment-917369 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.