When setting up a Wordpress site/blog, the web server may need access to the files. The following configuration for the file permissions could be optimal and resolve most of the issues related to file permissions.

One of the errors due to incorrect file permissions is show below. Wordpress doesn't have enough privileges to perform a plugin install.
sudo chown www-data:www-data -R * # Let apache be owner sudo find . -type d -exec chmod 755 {} \; # Set dir permissions rwxr-xr-x sudo find . -type f -exec chmod 644 {} \; # Set file permissions rw-r--r--
After the setup it is better to tighten the access rights, according to Hardening WordPress all files except for wp-content should be writable by your user account only. wp-content must be writable by www-data too.
No comments:
Post a Comment