MediaWiki 1.32.2 does not recognize LocalSettings.php

It appears that after installing MediaWiki 1.32.2 from the repositories, I cannot finish the configuration.

While the normal configuration steps work as expected, once I get the LocalSettings.php file and I copied it to the proper place, it is not recognized.

So far, I double-checked permissions and checked the content of PHP files leading to the message, but could not find anything which was wrong.

As a MediaWiki veteran, I am surprised about this particular installation problem and there is nothing I could find on the topic.

I also contacted Wikimedia Foundation support, but they pointed out that since it was installed from an RPM source, they would not know if some changes had been done to the packages/files.

The first thing that comes to mind is selinux.
So, just to test if the issue is related to that, try to temporarily disable it:
sudo setenforce 0

More informations in this article:

1 Like

Hi @alciregi,

I realize that I forgot to mention it, but I actually did my homework and put SELinux on permissive mode. I actually use a script for the initial setup of my server(s) to do so. Also, other services (e.g. NextCloud) work and MediaWiki itself does show me a valid page (instead of a 403 or similar) as well. It just disregards LocalSettings.php.

However, as stated in my initial response: I am a veteran when it comes to setting up MediaWiki and indeed set it up already several times. I do understand and appreciate that everyone can forget to tweak a setting of course. Though if it would be so trivial as to putting SELinux to permissive mode I would not have asked here. :wink:

Thank you nevertheless for the response.

1 Like

I didn’t want to doubt of your expertise.
Mine was a hope that the issue could be trivial :relaxed:

Check the file and parent directory permissions:

sudo -u limited_user -g limited_group stat /path/to/file

Check the web server configuration and access permissions.

Hi @vgaetera,

I also did check permissions. It is in line with the rest of the directory. Ownership is root:root with permissions to 644. I also tested apache:apache with 640.

I have a small script which can also trace back the permissions from the root directory ("/") to the file or directory I point to and all looks fine for the user “apache”, who can read the file.

1 Like