What do I need to do to allow files and directories created by PHP to be deleted by a user through FTP? I have a script that generates my thumbnails for me. But I only want half a dozen gallaries at a time and I want to delete one gallery when I upload the next.
@pcthugOct 18.2006 — #Probably just a chmod at 0755 would be sufficient, look at the [url=http://www.php.net/manual/en/function.chmod.php]chmod[/url] function. With this said, any changing of permissions will assume the user PHP runs under as the current user. Therefore this may not be sufficient if your system is running a different FTP user.
@NogDogOct 18.2006 — #In most installations with PHP running as an Apache module, you'll probably have to chmod() the files in question to some combination of 7's and 6's (the first bit is the execute permission bit, so it won't affect this). This is because the script will create any files under the Apache user account, so you'll need to add write permission for group or world if you want to delete via another user (e.g. your FTP account).