Problem Installing Vanilla 2.3 (in SE Linux) [RESOLVED]
I'm trying to test Vanilla but can't seem to get past the setup. I created a 'forums' folder in my http root directory, I also chmod'd the cache & conf directory, but when I go to http://[my server ip]/forums I get a message stating that "These folders must be readable and writable by the web server:" and it lists
I have verified that they are all readable and writable
bash-4.2$ ls -l /var/www/html/forums
drwxrwxrwx. 5 root root 56 Nov 18 10:44 applications
-rw-rw-rw-. 1 root root 7907 Nov 18 10:44 bootstrap.php
drwxrwxrwx. 3 root root 34 Nov 18 10:44 cache
drwxrwxrwx. 2 root root 86 Apr 25 15:28 conf
bash-4.2$ ls -l /var/www/html/forums/cache/
drwxrwxrwx. 3 root root 35 Nov 18 10:44 Smarty
bash-4.2$ ls -l /var/www/html/forums/cache/Smarty/
drwxrwxrwx. 2 root root 21 Nov 18 10:44 compile
I did have to create a config.php file with the following contents:
$Configuration['Debug'] = TRUE;
$Configuration['Garden']['RewriteUrls'] = false;
Without the 'RewriteUrls' the web server wasn't able to locate the directories and I added 'Debug' to see if I could get any additional information on the problem, but don't see anything. I also replaced the default .htaccess with the one from 2.2 (as suggested in several posts I've read).
PHP 7.1.4 (phpMyAdmin works & a basic phpinfo.php in the 'forums' directory works).
Appreciate any ideas or thoughts you may have
SELinux? I've always wanted to have a look at that but never did. From what I could find by doing a quick internet search, that could be the cause. Are there apache error logs or logs for what SELinux is blocking (perhaps in /var/log/audit/audit.log)?5
# RewriteBase /and change it to
1 - It is a test machine so I wasn't concerned about these settings, however; I made the changes you suggested - no difference
2 - I went to modify config-default.php but it has the "DO NOT EDIT" at the top, so I created config.php. I went ahead and deleted config.php and placed those options in the default file - no difference
3 - I already had RewriteBase in the .htaccess file (see below).
Any other thoughts?
The main problem is the false read/write permission message. I would try to focus on that first and delete the complete folder contents and re-upload all files (or get the zip with wget and unzip it on the server)
you tried to install vanilla with htaccess version 2.2.1 ?
@R_J I completely removed the forums directory, used wget to get the vanilla zip, unzip it. I chown -R apache forums, and chmod -R 777 forums but I still ended up with the same issue.
I went ahead and added:
to config-defaults.php, when I do this I get the following
but if I do the following manually the file is created properly (I have also confirmed that my apache server is using the 'apache' user)
[[email protected] forums]# su apache -s /bin/sh -c 'echo Hello > /var/www/html/forums/conf/8827847255901046faeb24.tmp' [[email protected] forums]# su apache -s /bin/sh -c 'cat /var/www/html/forums/conf/8827847255901046faeb24.tmp' Hello
Just as a test i modified 'library/core/functions.general.php" and added a bunch of print statements to the 'isWritable' function to see if I could get more information. The interesting thing is that the 'fopen' call fails for both the 'conf' and 'cache' directory but succeeds for the 'uploads' directory. As best as I can tell these 3 directories are configured identically
drwxrwxrwx. 3 apache root 49 Apr 26 15:54 cache drwxrwxrwx. 2 apache root 4096 Apr 26 16:43 conf drwxrwxrwx. 2 apache root 21 Apr 26 16:43 uploads
The only difference I can see is that uploads is an empty directory, cache has the 'Smarty' directory and conf has the configuration files.
Apache is being run as a daemon (sudo systemctl start httpd), I'm a bit rusty on my Linix but is it possible when that process is running it has restricted access for some reason, e.g. selinux (even though it owns the directory and files)? I will have to investigate this further if you don't know off the top of your head.
@kopana Do you think the .htaccess file would cause this issue? If you can point me to a 2.2.1 version I'll give it a try (I'll try find it myself in the mean time)
Thanks for all the great input, you've been very supportive.
Vanilla 2.2.1 Change the file .htaccess before installing Vanilla.
SELinux? I've always wanted to have a look at that but never did. From what I could find by doing a quick internet search, that could be the cause. Are there apache error logs or logs for what SELinux is blocking (perhaps in /var/log/audit/audit.log)?
It was SELinux causing the problem, looking at the auditlog and running "audit2allow -w -a" provided the information on fixing it. I actually just set SELinux to be permissive instead of enforcing (the machine doesn't have internet access).
Thanks for getting back to report the resolution.
I've edited the title of the thread a bit to try to reflect the issue a bit more clearly. (If the change doesn't do that, could you let me know what would be better?)