WordPress Server Permissions
-
Greetings!
I’ve been fighting this for a couple months now, so it’d be really awesome if someone could help me figure out.
What I’m trying to accomplish is to have the owner of a directory and its contents be something other than the server user (in this case www-data), yet still allow the server to read/write to said directory. Here’s what I’ve tried:
- Add the user to the www-data group
- Set all files/folders chown to user:www-data
- Set all directories to 775 permission
- Set all files to 664 permission
This almost works. For some crazy reason though I still cannot install/update plugins or the wordpress core — any moment wherein www-data would need to create a directory and create/modify/delete files. If, however, I chown www-data -R the entire directory, it works. This absolutely baffles me!
I’m also gone the ACL route:
- Install acl, add to fstab, remount
- Setfacl -Rdm g:www-data:rwx wordpress/
- Find wordpress/ -type f -exec setfacl -m g:www-data:rw {} \;
I even tried adding an acl for www-data as a user as well as a group. No difference.
I absolutely must be missing some simple permissions concept here. I actually got it to work on one site, but I have absolutely no idea why it worked on that one and not 4 others. Someone please shed some light on this! It’s driving me bonkers! Hahah!
Thank you!
P.S. The same problem occurs on either apache or nginx, so I’m sure it’s a permissions issue.
- The topic ‘WordPress Server Permissions’ is closed to new replies.