I have a directory of files and folders that are added and removed and the permissions that I had set keep changing. How can I permanently keep the permissions on a specific path so that no matter what happens in its folders all files and folders inside that folder will recursively follow the permissions set.
The permissions I had set is the following:
sudo chmod 755 -R /var/www/uploads sudo chown www-data:www-data -R /var/www/uploads
I'm not sure what user group is used by php/apache when I write the code to delete the files and I'm guessing that would be why it cant do it.