LocalSettings.php not readable even if I set permission to 777

亡梦爱人 提交于 2019-12-11 04:00:26

问题


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.

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


回答1:


I was having the same issue and resolved this by running the following command:

sudo restorecon -r /var/www/wiki/

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


来源:https://stackoverflow.com/questions/29363757/localsettings-php-not-readable-even-if-i-set-permission-to-777

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!