Owner of uploads directory is `www-data` but this prevents FTP access via PHP scripts
- by letseatfood
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?