News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Install fails at writability check

Started by zoof, June 19, 2018, 11:08:30 PM

Previous topic - Next topic

zoof

Hi,

I'm trying to install smf 2.1 on a Centos 7 LAMP, GCE instance and it's failing in the writability check.  I unpacked the installation file in /var/www/html, created the files Settings_bak.php and db_last_error.php and changed the owner to apache for all files in /var/www/html but it still does not work.  I then tried the same with the 2.0 installer and still the same problem.  In both cases, I then also changed permissions for files to 777 and still no joy.

Any ideas what could be going wrong?

Thanks in advance!

shawnb61

Did you use 2.1 beta 3?   Or the latest from Github (beta 4)?

What is the exact message? File & Line #?   
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Biology Forums

Try making every file 777 recursively

zoof

@shawnb61: 2.1 beta 3 and error_log shows:
[Wed Jun 20 09:55:15.705890 2018] [:error] [pid 2048] [client xx.xx.xx.xx:41102] PHP Warning:  file_put_contents(/var/w
ww/html/db_last_error.php): failed to open stream: Permission denied in /var/www/html/Settings.php on line 195


@Study Force:
# chmod -R 777 attachments/ avatars/ custom_avatar/ cache/ Packages/ Smileys/ Themes/ agreement.txt
Settings.php Settings_bak.php db_last_error.php
# ls -l
total 2572
-rwxrwxrwx. 1 apache apache    3342 Jun  1  2017 agreement.txt
drwxrwxrwx. 2 apache apache      40 Jun 20 02:52 attachments
drwxrwxrwx. 3 apache apache      73 Jun 20 02:52 avatars
drwxrwxrwx. 2 apache apache      40 Jun 20 02:52 cache
-rw-r--r--. 1 apache apache    5606 Jun  1  2017 contributors.txt
-rw-r--r--. 1 apache apache   10084 Jun  1  2017 cron.php
drwxrwxrwx. 2 apache apache      40 Jun 20 02:52 custom_avatar
-rwxrwxrwx. 1 apache apache       0 Jun 20 09:51 db_last_error.php
-rw-r--r--. 1 apache apache   14460 Jun  1  2017 index.php
-rw-r--r--. 1 apache apache      18 Jun 18 21:46 info.php
-rw-r--r--. 1 apache apache   69228 Jun  1  2017 install_2-1_mysql.sql
-rw-r--r--. 1 apache apache   81670 Jun  1  2017 install_2-1_postgresql.sql
-rw-r--r--. 1 apache apache   81887 Jun  1  2017 install.php
-rw-r--r--. 1 apache apache    1591 Jun  1  2017 LICENSE
drwxrwxrwx. 3 apache apache      55 Jun 20 02:52 Packages
-rw-r--r--. 1 apache apache    5085 Jun  1  2017 proxy.php
-rw-r--r--. 1 apache apache   30373 Jun  1  2017 readme.html
-rwxrwxrwx. 1 apache apache       0 Jun 20 09:51 Settings_bak.php
-rwxrwxrwx. 1 apache apache    5518 Jun  1  2017 Settings.php
-rw-r--r--. 1 apache apache 2144579 Jun 20 02:52 smf_2-1-beta3_install.tar.bz2
drwxrwxrwx. 6 apache apache      78 Jun 20 02:52 Smileys
drwxr-xr-x. 5 apache apache    8192 Jun 20 02:52 Sources
-rw-r--r--. 1 apache apache   27096 Jun  1  2017 ssi_examples.php
-rw-r--r--. 1 apache apache    5668 Jun  1  2017 ssi_examples.shtml
-rw-r--r--. 1 apache apache   93640 Jun  1  2017 SSI.php
-rw-r--r--. 1 apache apache    9606 Jun  1  2017 subscriptions.php
drwxrwxrwx. 3 apache apache      38 Jun 20 02:52 Themes

Biology Forums

Doesn't look like it's consistent. Can you make all files 0777?

chmod -R 0777 /PATHWAY/TO/SMF

zoof

Sadly still not working...  ???
# chmod -R 0777 html/
# ls -l html/
total 2572
-rwxrwxrwx. 1 apache apache    3342 Jun  1  2017 agreement.txt
drwxrwxrwx. 2 apache apache      40 Jun 20 02:52 attachments
drwxrwxrwx. 3 apache apache      73 Jun 20 02:52 avatars
drwxrwxrwx. 2 apache apache      40 Jun 20 02:52 cache
-rwxrwxrwx. 1 apache apache    5606 Jun  1  2017 contributors.txt
-rwxrwxrwx. 1 apache apache   10084 Jun  1  2017 cron.php
drwxrwxrwx. 2 apache apache      40 Jun 20 02:52 custom_avatar
-rwxrwxrwx. 1 apache apache       0 Jun 20 09:51 db_last_error.php
-rwxrwxrwx. 1 apache apache   14460 Jun  1  2017 index.php
-rwxrwxrwx. 1 apache apache      18 Jun 18 21:46 info.php
-rwxrwxrwx. 1 apache apache   69228 Jun  1  2017 install_2-1_mysql.sql
-rwxrwxrwx. 1 apache apache   81670 Jun  1  2017 install_2-1_postgresql.sql
-rwxrwxrwx. 1 apache apache   81887 Jun  1  2017 install.php
-rwxrwxrwx. 1 apache apache    1591 Jun  1  2017 LICENSE
drwxrwxrwx. 3 apache apache      55 Jun 20 02:52 Packages
-rwxrwxrwx. 1 apache apache    5085 Jun  1  2017 proxy.php
-rwxrwxrwx. 1 apache apache   30373 Jun  1  2017 readme.html
-rwxrwxrwx. 1 apache apache       0 Jun 20 09:51 Settings_bak.php
-rwxrwxrwx. 1 apache apache    5518 Jun  1  2017 Settings.php
-rwxrwxrwx. 1 apache apache 2144579 Jun 20 02:52 smf_2-1-beta3_install.tar.bz2
drwxrwxrwx. 6 apache apache      78 Jun 20 02:52 Smileys
drwxrwxrwx. 5 apache apache    8192 Jun 20 02:52 Sources
-rwxrwxrwx. 1 apache apache   27096 Jun  1  2017 ssi_examples.php
-rwxrwxrwx. 1 apache apache    5668 Jun  1  2017 ssi_examples.shtml
-rwxrwxrwx. 1 apache apache   93640 Jun  1  2017 SSI.php
-rwxrwxrwx. 1 apache apache    9606 Jun  1  2017 subscriptions.php
drwxrwxrwx. 3 apache apache      38 Jun 20 02:52 Themes

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Shambles

Quote... changed the owner to apache for all files in /var/www/html ...

Can you try changing it to something else?

I had this same issue 3 years back (2.0.13 at the time iirc) and my host swapped ownership to {something} which then worked for me.

zoof

Quote from: vbgamer45 on June 20, 2018, 11:50:06 AM
do you have SE Linux enabled?

Ugh. Yes. Should I disable it entirely or is there something more fine grained that I can do?

vbgamer45

That is the quickest fix but if you must have it.


Some notes i have commands to run:
sudo setsebool -P httpd_can_sendmail 1
sudo setsebool -P httpd_can_network_connect 1

chcon -R -t httpd_sys_script_rw_t /var/www/
chcon -t httpd_sys_content_t /var/www/ -R


Also saw this guide for another software which might be handy

https://www.mediawiki.org/wiki/SELinux

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

zoof

@vbgamer45: Thanks -- I went ahead and completely disabled it.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


Advertisement: