本文介绍了字preSS无法安装主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能锻炼如何解决这个问题,让字preSS会让我上传的主题。

I can't workout how to solve this problem so wordpress would let me upload themes.

我有我的开发机上安装的Fedora 17的新副本。

I have a fresh copy of Fedora 17 installed on my dev machine.

然后我用mysql安装。接下来,我安装了Word preSS也会安装Apache和PHP:百胜安装字preSS

I then installed mysql using: yum install mysql mysql-server. Next I installed WordPress which also installs apache and php: yum install wordpress

我可以去的http://本地主机/字preSS ,看字preSS工作。但是当我尝试尝试安装我的主题,它要求FTP凭证。然后,我更新了wp-config.php文件,并设置 FS_METHOD 常量直接。现在,它不要求FTP凭据,但它给了我这个错误:

I can go to http://localhost/wordpress and see WordPress working. But when I try tried to install my theme it asked for ftp credentials. I then updated the wp-config.php file and set the FS_METHOD constant to direct. Now it doesn't ask for ftp credentials but it gives me this error:

Could not create directory. /usr/share/wordpress/wp-content/themes/my-theme-name/

httpd服务是根据'阿帕奇'用户和'阿帕奇'组运行。在的/ usr /共享/字preSS / 目录是'阿帕奇'用户和'阿帕奇'组太递归自己。我甚至将权限设置为777(也递归),甚至然后我不断收到相同的错误之上。

httpd service is running under 'apache' user and 'apache' group. The /usr/share/wordpress/ directory is recursively own by 'apache' user and 'apache' group too. I've even set the permissions to 777 (also recursively) and even then I keep getting the same error as above.

我该如何解决这个问题呢?

How can I solve this problem?

推荐答案

软呢帽的SELinux配置是最有可能阻断网络服务器的尝试写入磁盘。要更改设置你的话preSS文件夹,您可以运行此命令(作为root):

Fedoras SELinux configuration is most probably blocking the attempts of the webserver to write to the disk. To change the settings for your wordpress folder you can run this command (as root):

chcon -R -t httpd_sys_content_rw_t /usr/share/wordpress/wp-content

没有必要做搭配chmod 777 来整个文件夹,这是一个巨大的安全隐患。当然,这是直接访问文件系统,您必须禁用FTP访问。 FTP访问,你将不得不查找正确的SELinux上下文。

No need to do chmod 777 to the whole folder, this is a huge security risk. Of course this is for direct filesystem access, you have to disable the ftp access. For ftp access you will have to look up the right SELinux context.

这篇关于字preSS无法安装主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 18:54
查看更多