Hi there,

A project I'm working on at the moment requires me to delete files and folders on the server.

I'm testing it locally at the moment, and I'm running into a couple of problems.

Firstly, even though the subfolder and the files have their permissions set to 0777, I get the error message:
Warning: unlink(/Users/mickyginger/Sites/galleries/Cradles/index.php) [function.unlink]: Permission denied in /Users/mickyginger/Sites/includes/helpers.inc.php on line 20
Secondly, and more worryingly, as I'm using a mac I have a hidden file .ds_store in every folder, which is created by mac os x, which also cannot be deleted, because of permission settings.

Can anyone shed some light on the best practice for the creation and deletion of files and folders with php.

Many thanks,
Mike