Reputation: 1304
I need to give write permission to apache on all my files, I checked apache user in config file and with exec("whoami"), it's www-data, but if I had www-data to root group apache isn't able to write a file. I tried to set run-group as root and restart apache, but nothing change. How can I do to give this permission to apache ?
Upvotes: 0
Views: 857
Reputation: 13211
First of all your should check what kind of permission level you want. A good way to go is to give write permissions only for folders where you need it.
check that your www-data user is at least in the group of the access group or change the it:
chgrp -R www-data folder/
then set the write permissions with
chmod -R g+w folder
should be enough
Upvotes: 1