我一直在搜索,终于找到了解决这个问题的方法。对于将CentOs 7与Plesk 12结合使用的用户:
The issue is with SELinux.
在强制模式下使用时(默认情况下),
wp-content
无法通过FTP显示自身。将其切换到许可模式或禁用SELinux完全可以解决问题。
整个问题将在下一个版本的Plesk中修复,并已在Plesk预览版12.1.13的最新更新中运行。CentOS 5和6不受影响。
要在CentOS 7上禁用SELinux,我们可以使用:setenforce 0
或者,要切换到许可模式,请使用以下命令:setenforce permissive
现在,我们需要重新启动xinetd服务和Plesk,以使更改生效:
systemctl restart xinetd.service
service psa stopall
service psa restart
如果服务器重新启动,上述设置将丢失。要永久使用上述设置,应编辑selinux配置文件:
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted