admin管理员组文章数量:1404924
Not sure what I changed in my Wordpress some days ago but today I was not able to update/install any plugin. I followed and applied the following permissions:
sudo find ~/apps/wordpress/htdocs/ -type f -exec chmod 644 {} \;
sudo find ~/apps/wordpress/htdocs/ -type d -exec chmod 755 {} \;
sudo chmod 750 ~/apps/wordpress/htdocs/wp-config.php
sudo find ~/apps/wordpress/htdocs/wp-content -type d -exec chmod 775 {} \;
sudo find ~/apps/wordpress/htdocs/wp-content -type f -exec chmod 664 {} \;
sudo chmod 750 ~/apps/wordpress/htdocs
sudo chown -R bitnami:daemon ~/apps/wordpress/htdocs
sudo chown -R bitnami:daemon ~/apps/wordpress/htdocs/wp-content/plugins
sudo chown -R bitnami:bitnami ~/apps/wordpress/htdocs/wp-content/upgrade
sudo chown -R daemon:daemon ~/apps/wordpress/htdocs/wp-content/uploads
Now I CAN update and install plugins but:
- It takes longer, roughly twice as much time than some days ago (before it broke).
- It tells me the install/update was unsuccesful even though it did it!
The update cannot be installed because we were unable to copy some files. This is usually due to inconsistent file permissions.
Of course, it is not that bad, but I would like to have it as it should be, not with such a result.
Any idea?
Not sure what I changed in my Wordpress some days ago but today I was not able to update/install any plugin. I followed https://community.bitnami/t/wordpress-permissions-unable-to-create-directory/42048/3 and applied the following permissions:
sudo find ~/apps/wordpress/htdocs/ -type f -exec chmod 644 {} \;
sudo find ~/apps/wordpress/htdocs/ -type d -exec chmod 755 {} \;
sudo chmod 750 ~/apps/wordpress/htdocs/wp-config.php
sudo find ~/apps/wordpress/htdocs/wp-content -type d -exec chmod 775 {} \;
sudo find ~/apps/wordpress/htdocs/wp-content -type f -exec chmod 664 {} \;
sudo chmod 750 ~/apps/wordpress/htdocs
sudo chown -R bitnami:daemon ~/apps/wordpress/htdocs
sudo chown -R bitnami:daemon ~/apps/wordpress/htdocs/wp-content/plugins
sudo chown -R bitnami:bitnami ~/apps/wordpress/htdocs/wp-content/upgrade
sudo chown -R daemon:daemon ~/apps/wordpress/htdocs/wp-content/uploads
Now I CAN update and install plugins but:
- It takes longer, roughly twice as much time than some days ago (before it broke).
- It tells me the install/update was unsuccesful even though it did it!
The update cannot be installed because we were unable to copy some files. This is usually due to inconsistent file permissions.
Of course, it is not that bad, but I would like to have it as it should be, not with such a result.
Any idea?
2 Answers
Reset to default 0Make sure the user running on behalf of the webserver's PHP process has ownership permissions on /path/to/wordpress
Example
For Ubuntu 18.04 running Apache2
# Go to wordpress installation root directory
cd /path/to/wordpress
# Give ownership to Apache2's PHP process
sudo chown www-data:www-data .
# Apply files and directories permissions
sudo find . -type f -exec chmod 664 {} +
sudo find . -type d -exec chmod 775 {} +
sudo chmod 644 wp-config.php
It works now. For those wondering, there was something wrong with the symlinks so I just went back to the original WP permissions.
sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/
sudo find /opt/bitnami/apps/wordpress/ -type f -exec chmod 664 {} \;
sudo find /opt/bitnami/apps/wordpress/ -type d -exec chmod 775 {} \;
sudo chmod 640 /opt/bitnami/apps/wordpress/htdocs/wp-config.php
I semi-modified the answer from here: https://community.bitnami/t/cant-update-wordpress-plugin/72068/6
本文标签: serverPermissions working but not working
版权声明:本文标题:server - Permissions working but not working 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744874769a2629850.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论