即使我将权限设置为777,LocalSettings.php也无法读取 [英] LocalSettings.php not readable even if I set permission to 777
问题描述
我正在使用新安装的fedora21.我正在使用Mediawiki 1.24.1,并通过安装页面创建了LocalSettings.php文件.我还有chown -R apache:apache的mediawiki文件夹.
I'm on a freshly installed fedora 21. I am using mediawiki 1.24.1 and created the LocalSettings.php file through the installation page. I have also chown -R apache:apache the mediawiki folder.
但是,当我尝试打开实际的Wiki时,即使我将LocalSettings.php的权限设置为777,页面也会显示"LocalSettings.php不可读"
However, when I try to open the actual wiki the page says 'LocalSettings.php not readable' even if I set the permission of LocalSettings.php to 777
推荐答案
我遇到了同样的问题,并通过运行以下命令解决了这个问题:
I was having the same issue and resolved this by running the following command:
sudo restorecon -r /var/www/wiki/
似乎SELinux由于某种原因阻止了我们. restorecon
是非常安全的,基本上可以重置文件的安全上下文.
It seems like SELinux was blocking us for some reason. restorecon
is very safe and basically resets the security context of the files.
确保将权限重新设置为更安全的值:
Make sure you set the permissions back to a safer value:
sudo chmod 644 /var/www/wiki/LocalSettings.php
这篇关于即使我将权限设置为777,LocalSettings.php也无法读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!