0

My wp-content folder has owner User and group www-data. The permissions are 775 for folders and 664 for files, so the server can write inside the folder.

But when the server creates folder and files inside wp-content ( when installing theme ), they have the server as owner ( and the server's primary group ) and they get 755 for folder and 644 for files.

So I can't keep all folders and files of a WordPress installation under User ownership.

How can I make all newly created folders and files created by server inside wp-content inherit the ones that the parent folder has?

Thank you.

  • 1
    755 and 644 - or even 750 and 640 - are the recommended permissions to set. – Nicolai Apr 29 '15 at 13:39
  • @ialocin the server is not the owner but only the group so i have to change the ownerships. – tioschi Apr 29 '15 at 13:43
  • In short, the server should be the owner as the server has the rights to run apache. – Nicolai Apr 29 '15 at 13:47
  • @ialocin it is not always like that. The owner of the files should be the user the system administrator and the apache user should be the included in the group. – tioschi May 4 '15 at 7:43
0

I've had this problem because I host a few Wordpress sites on a few servers. Apache should own everything because Wordpress creates folders and files as it runs. If you want the user to make changes to Wordpress files then add the user to the group apache and change the permissions to 775.

  • this is a solution that a lot people adapt. But it is not always the correct one. Apache should only have access to write inside wp-content, so for the rest files should not have the ability to write. It should only read. That is why you just give him group permissions. I think this is what they propose here. – tioschi May 13 '15 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.