WordPress file permissions on CentOS7 requiring sudo WordPress file permissions on CentOS7 requiring sudo wordpress wordpress

WordPress file permissions on CentOS7 requiring sudo


Look at:What does mode_t 0644 mean?

644 means: * (owning) User: read & write * Group: read * Other: read

CRUD is a write command, so you're not allowed to do that. Either you change to 664 or keep using sudo. Basically any writing procedure on the file system would not be allowed without sudo since your user is not the owner (event though he is in the group).


@fortuneRice, CentOS7 features selinux enabled by default, which is often the cause of many hard-to-understand file permission errors.

I would suggest the following:

  1. Edit /etc/sysconfig/selinux
  2. Change SELINUX=permissive (or whatever SELINUX is currently set to in the file) to SELINUX=disabled
  3. Reboot your server (not just the apache web server, but the whole machine)

Disabling SELINUX completely is not a good idea, therefore if this procedure works, you should re-enable SELINUX and fix its configuration.

Configuring SELINUX can be a difficult task, so I suggest you read up on google how to do that :)


chown -R -f user:apache /path of the directory