Using MariaDB, Apache, PHP 5.4.x, RHEL 7
使用MariaDB,Apache,PHP 5.4.x,RHEL 7
How do I allow configuration.php to be written to?
如何允许将configuration.php写入?
Installed Joomla several times, always ending up with the configuration.php file not writable. I proceeded, copied the config content and created a new php file, placed it where Joomla lives, opened up the permissions, changed to apache:apache, still nothing. I've referenced several articles, notably this one: Installing Joomla 3 Error: Your configuration file or directory is not writable
多次安装Joomla,总是以configuration.php文件结束不可写。我继续,复制配置内容并创建一个新的php文件,将它放在Joomla所在的位置,打开权限,更改为apache:apache,仍然没有。我引用了几篇文章,特别是这篇文章:安装Joomla 3错误:您的配置文件或目录不可写
I have also tried creating an empty configuration.php file and placing it in the joomla root, opening up permissions - didnt work.
我也尝试创建一个空的configuration.php文件并将其放在joomla根目录中,打开权限 - 没有用。
My current state of installation is configuration.php file in place, but unable to remove the installation directory via the web installer (assuming because I shoehorned the config file into place and still not being writable).
我当前的安装状态是configuration.php文件,但无法通过Web安装程序删除安装目录(假设因为我将配置文件置于适当位置并且仍然无法写入)。
I've tried several permissions setups then attempting to remove the install directory without success. Manually removing the install directory via rm -r only yields a totally inaccessible site forcing me to wipe my joomla files, databases, and install again. Thanks in advance.
我尝试了几个权限设置,然后尝试删除安装目录但没有成功。通过rm -r手动删除安装目录只会产生一个完全无法访问的站点,迫使我擦除我的joomla文件,数据库并再次安装。提前致谢。
1
The first thing I would do is check what user php runs at on your server, and compare this with ownership of your site files.
我要做的第一件事是检查服务器上运行的用户php,并将其与站点文件的所有权进行比较。
Create user.php file at the root of your domain with
使用您的域的根目录创建user.php文件
<?php echo exec('whoami'); ?>
then open that file with your broser. This will give you the name of the user that php runs as on your server. It may be apache but it may not.
然后用你的broser打开那个文件。这将为您提供php在您的服务器上运行的用户的名称。它可能是apache但它可能不是。
Compare this user with the ownership of config.php and your site installation as a whole.
将此用户与config.php的所有权以及整个站点安装进行比较。
If you upload a new Joomla site via SFTP and follow the standard browser instal steps, permissions shouldn't be a problem. If you are say uploading a zip file and using a terminal connection and SSH, make sure your SSH connection is the same user as the php user on your server.
如果您通过SFTP上传新的Joomla站点并遵循标准的浏览器安装步骤,则权限应该不是问题。如果您要上传zip文件并使用终端连接和SSH,请确保您的SSH连接与服务器上的php用户相同。
Good luck!
祝你好运!
0
Working with my server guy - found out that several sebool settings were keeping Apache from doing what it needed to do. Going one step further, we identified that sebool commands needed to be ran to allow httpd_can_sendmail in order to use the Sendmail feature. Hope this helps someone out there.
与我的服务器人员一起工作 - 发现有几个sebool设置让Apache无法做他们需要做的事情。更进一步,我们确定需要运行sebool命令以允许httpd_can_sendmail才能使用Sendmail功能。希望这有助于那里的人。
The command that seemed to do the trick was sudo chcon -R -t httpd_sys_rw_content_t /var/www/html
似乎可以解决这个问题的命令是sudo chcon -R -t httpd_sys_rw_content_t / var / www / html
0
In our case, problem was with CentOS permissions. So if Joomla is installed on CentOS powered server, you need to change config file (/etc/selinux/config) to look like this:
在我们的例子中,问题在于CentOS权限。因此,如果Joomla安装在CentOS驱动的服务器上,则需要更改配置文件(/ etc / selinux / config),如下所示:
[root@host2a ~]# cat /etc/sysconfig/selinux
# 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 - SELinux is fully disabled.
SELINUX=permissive
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
Actually, you only set SELINUX to permissive.
实际上,您只将SELINUX设置为允许。
Hope this helps.
希望这可以帮助。
p.s. Solution works for RedHat too.
附:解决方案也适用于RedHat。
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.silva-art.net/blog/2015/09/30/33f28e6b7a472592b32dea019cfac545.html。