To allow write access to Apache, I needed to chown www-data:www-data /var/www/mysite/uploads to my site's upload folder. This allows me to delete files from the folder via unlink() in a PHP script.
Unfortunately, this prevents another PHP script, which uses FTP functions, from working. I think it is because the FTP user is mike and now that the uploads directory is owned by www-data, mike cannot access it.
I added mike to the group www-data, but this does not fix the issue.
Can somebody advise me on how to allow PHP FTP functions to work in addition to file deletion using PHP's unlink() function?
/var/www/mysite/uploadsarer-s– Mike Moore May 19 '10 at 21:13/var/www/mysite? – jneves May 19 '10 at 23:38/var/www/mysitearer-s– Mike Moore May 20 '10 at 0:20