Fedora 23 preinstall

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
User avatar
paulhr
Registered User
Posts: 13
Joined: Wed Jul 20, 2016 11:37 am
Name: Paul Roubekas
Contact:

Fedora 23 preinstall

Post by paulhr »

Fedora 23
php 5.6.23-1.fc23
phpBB 3.1.9

I have full root access to the Fedora 23 OS. I read this post https://www.phpbb.com/support/docs/en/3 ... rmissions/ and wrote a bash script to implement it.

============================================================
dophpBBPermissionChanges.sh
#!/usr/bin/bash

PHPBB_INSTALL_FULL_PATH="/var/www/html/usque/bb"

# All other files - 644
find ${PHPBB_INSTALL_FULL_PATH} -type f -exec chmod 644 {} +

# 666 before installation
# 644 after installation
find ${PHPBB_INSTALL_FULL_PATH} -name config.php -exec chmod 644 {} +

# All directories - 755
find ${PHPBB_INSTALL_FULL_PATH} -type d -exec chmod 755 {} +

# The files directory - 777
find ${PHPBB_INSTALL_FULL_PATH} -type d -name files -exec chmod 777 {} +

# The cache directory - 777
find ${PHPBB_INSTALL_FULL_PATH} -type d -name cache -exec chmod 777 {} +

# The store directory - 777
find ${PHPBB_INSTALL_FULL_PATH} -type d -name store -exec chmod 777 {} +

# The images/avatars/upload directory - 777
find ${PHPBB_INSTALL_FULL_PATH}/images/avatars -type d -name upload -exec chmod 777 {} +

============================================================

I have rebooted httpd, php and the whole OS. But I still get "Unwriteable".

============================================================

PHP version and settings

Required - You must be running at least version 5.3.3 of PHP in order to install phpBB. If safe mode is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.

PHP version >= 5.3.3:
Yes

PHP setting allow_url_fopen is enabled:
Optional - This setting is optional, however certain phpBB functions like off-site avatars will not work properly without it.
Yes

PHP function getimagesize() is available:
Required - In order for phpBB to function correctly, the getimagesize function needs to be available.
Yes

PCRE UTF-8 support:
phpBB will not run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.
Yes

PHP JSON support:
Required - In order for phpBB to function correctly, the PHP JSON extension needs to be available.
Yes

mbstring extension check

Required - mbstring is a PHP extension that provides multibyte string functions. Certain features of mbstring are not compatible with phpBB and must be disabled.

Function overloading:
mbstring.func_overload must be set to either 0 or 4.
Yes

Transparent character encoding:
mbstring.encoding_translation must be set to 0.
Yes

HTTP input character conversion:
mbstring.http_input must be set to pass.
Yes

HTTP output character conversion:
mbstring.http_output must be set to pass.
Yes

Supported databases

Required - You must have support for at least one compatible database within PHP. If no database modules are shown as available you should contact your hosting provider or review the relevant PHP installation documentation for advice.

MySQL with MySQLi Extension:
Available

MySQL:
Available

MSSQL Server 2000+:
Unavailable

MSSQL Server 2000+ via ODBC:
Unavailable

MSSQL Server 2005+ [ Native ]:
Unavailable

Oracle:
Unavailable

PostgreSQL:
Unavailable

SQLite 2:
Unavailable

SQLite 3:
Available

Optional modules

Optional - These modules or applications are optional. However, if they are available they will enable extra features.

zlib compression support [ gz, .tar.gz, .zip ]:
Available

Remote FTP support [ Installation ]:
Available

GD graphics support [ Visual Confirmation ]:
Available

XML support [ Jabber ]:
Available

Imagemagick support [ Attachments ]:
Available, /usr/bin/

Files and Directories

Required - In order to function correctly phpBB needs to be able to access or write to certain files or directories. If you see “Not Found” you need to create the relevant file or directory. If you see “Unwritable” you need to change the permissions on the file or directory to allow phpBB to write to it.

cache/:
Found, Unwritable

files/:
Found, Unwritable

store/:
Found, Unwritable

Optional files and directories

Optional - These files, directories or permission settings are not required. The installation system will attempt to use various techniques to create them if they do not exist or cannot be written to. However, the presence of these will speed installation.

config.php:
Found, Unwritable

images/avatars/upload/:
Found, Unwritable

============================================================
User avatar
KaileyT
Community Team Member
Community Team Member
Posts: 2934
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Fedora 23 preinstall

Post by KaileyT »

Have you tried changing them manually?
Kailey Truscott - Community Team
User avatar
paulhr
Registered User
Posts: 13
Joined: Wed Jul 20, 2016 11:37 am
Name: Paul Roubekas
Contact:

Re: Fedora 23 preinstall

Post by paulhr »

The changes were performed as intended by the bash script. I even created an OS id and group just for phpBB. No change. The preinstall check still thinks the directories are "Unwritable".

Since there is no full path in the preinstall page I was hoping to get confirmation that the correct files were changed. In other words are all the permission issue and checks for OS artifacts in the phpBB tar file? So, for example, there are some "cache" directories not in the phpBB tar file. e.g. "/var/cache" Does phpBB need write permission there too?
User avatar
paulhr
Registered User
Posts: 13
Joined: Wed Jul 20, 2016 11:37 am
Name: Paul Roubekas
Contact:

Re: Fedora 23 preinstall

Post by paulhr »

I thought I found the issue. But after testing the issue remains. I found .htaccess files in the following directories.

/var/www/html/usque/bb/cache
/var/www/html/usque/bb/config
/var/www/html/usque/bb/files
/var/www/html/usque/bb/images/avatars/upload
/var/www/html/usque/bb/includes
/var/www/html/usque/bb/store
/var/www/html/usque/bb

I delete them and restarted httpd.service. No change. Still getting unwritable

One more fact that I forgot in the original post. I have installed phpBB under /var/www/html. Namely /var/www/html/usque/bb. Where bb is the phpBB3 directory in the tar file. Does phpBB support the top directory name change?
User avatar
Lumpy Burgertushie
Registered User
Posts: 68564
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Fedora 23 preinstall

Post by Lumpy Burgertushie »

not sure how this works the way you are doing it. however, this line is wrong:
ind ${PHPBB_INSTALL_FULL_PATH} -name config.php -exec chmod 644 {} +

config.php is supposed to be set to chmmod 666 during install and then back to 644 afterwards.

why are you doing this install like this? why not just put the files where they belong and install it like normal from your web browser?


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
paulhr
Registered User
Posts: 13
Joined: Wed Jul 20, 2016 11:37 am
Name: Paul Roubekas
Contact:

Re: Fedora 23 preinstall

Post by paulhr »

During my read of the PDF there was no mention of a "where they belong" directory.
After you have decompressed the phpBB3 archive and uploaded the files to the location
where you want it to be installed, you need to enter the URL into your browser to open
the installation screen. The first time you point your browser to the URL (http://
www.example.com/phpBB3 for instance), phpBB will detect that it is not yet installed
and automatically redirect you to the installation screen.
What do you mean by "where they belong"?
User avatar
paulhr
Registered User
Posts: 13
Joined: Wed Jul 20, 2016 11:37 am
Name: Paul Roubekas
Contact:

Re: Fedora 23 preinstall

Post by paulhr »

config.php is supposed to be set to chmmod 666 during install and then back to 644 afterwards.
No difference after the permissions correction above. PreInstall checks says unwritable.
User avatar
paulhr
Registered User
Posts: 13
Joined: Wed Jul 20, 2016 11:37 am
Name: Paul Roubekas
Contact:

Re: Fedora 23 preinstall

Post by paulhr »

The unwritable error does not make any sense. See the output below. ANYONE can write to the directories.

# ls /var/www/html/usque/bb/cache
total 8
-rw-r--r--. 1 phpbb phpbbg 169 Apr 16 06:16 index.htm
drwxrwxrwx. 2 phpbb phpbbg 23 Jul 26 16:31 .
drwxr-xr-x. 19 phpbb phpbbg 4096 Jul 26 16:32 ..

# ls /var/www/html/usque/bb/files
total 8
-rw-r--r--. 1 phpbb phpbbg 169 Apr 16 06:16 index.htm
drwxrwxrwx. 2 phpbb phpbbg 23 Jul 26 16:32 .
drwxr-xr-x. 19 phpbb phpbbg 4096 Jul 26 16:32 ..

# ls /var/www/html/usque/bb/store
total 8
-rw-r--r--. 1 phpbb phpbbg 169 Apr 16 06:16 index.htm
drwxrwxrwx. 2 phpbb phpbbg 23 Jul 26 16:29 .
drwxr-xr-x. 19 phpbb phpbbg 4096 Jul 26 16:32 ..
[root@burrowingOwl ~]#

# ls /var/www/html/usque/bb/images/avatars/upload/
total 4
-rw-r--r--. 1 phpbb phpbbg 169 Apr 16 06:16 index.htm
drwxr-xr-x. 4 phpbb phpbbg 52 Apr 16 06:16 ..
drwxrwxrwx. 2 phpbb phpbbg 23 Jul 26 17:10 .
User avatar
Lumpy Burgertushie
Registered User
Posts: 68564
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Fedora 23 preinstall

Post by Lumpy Burgertushie »

paulhr wrote:During my read of the PDF there was no mention of a "where they belong" directory.
After you have decompressed the phpBB3 archive and uploaded the files to the location
where you want it to be installed, you need to enter the URL into your browser to open
the installation screen. The first time you point your browser to the URL (http://
http://www.example.com/phpBB3 for instance), phpBB will detect that it is not yet installed
and automatically redirect you to the installation screen.
What do you mean by "where they belong"?
uploaded the files to the location
where you want it to be installed
where they belong
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
paulhr
Registered User
Posts: 13
Joined: Wed Jul 20, 2016 11:37 am
Name: Paul Roubekas
Contact:

Re: Fedora 23 preinstall

Post by paulhr »

Let me try a different explanation.

Step 1) I downloaded the phpBB-3.1.9.tar.bz2 file to my MS Windows 7 workstation.
Step 2) Uploaded the tar file to the /var/www/html/usque/
Step 3) untared the file with...

Code: Select all

tar xjvf phpBB-3.1.9.tar.bz2 
Step4) Renamed the directory from phpBB3 to "bb"
Step 5) Ran my custom made bash script dophpPermissionChanges.sh to set permissions

At which step did I go wrong?
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10423
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: Fedora 23 preinstall

Post by Noxwizard »

Fedora uses SELinux, so you will also need to make sure that your security contexts are set correctly so that Apache can write to it.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Fedora 23 preinstall

Post by canonknipser »

Using a script is a good idea if you do that often.
But:
Why do you use a find-command in your script?
Simple use a cd to change your working context and from there use chmod to change the permissions, maybe you have to use chown to change the owner and group to your apache user ( www / wwwrun?) first for the complete directory and its content.
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
User avatar
paulhr
Registered User
Posts: 13
Joined: Wed Jul 20, 2016 11:37 am
Name: Paul Roubekas
Contact:

Re: Fedora 23 preinstall

Post by paulhr »

@ Noxwizard
I know nothing about SELinux security contexts. After doing a internet search it still is not clear to me how to fix the write permissions issue. There is nothing to grant write permissions, just change one of four fields: user, role, type, and level.

Would this SELinux security context issue go away if I installed phpBB in the home directory of the phpBB user Id that was created for phpBB3 and not under /var/www/html, like i did it. What it the typical way phpBB is installed? Under the home directory of the phpBB user?

I would have to change my httpd-vhost.conf Alias directives again.
User avatar
paulhr
Registered User
Posts: 13
Joined: Wed Jul 20, 2016 11:37 am
Name: Paul Roubekas
Contact:

Re: Fedora 23 preinstall

Post by paulhr »

@ canonknipser
I used the find because the percheck does not give the full path and there are more than one "cache" directories in the artifacts in the install tar file. There is also more the one config.php in the artifacts in the install tar file. Using find will make sure none are missed.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52314
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Fedora 23 preinstall

Post by Brf »

paulhr wrote: There is also more the one config.php in the artifacts in the install tar file. Using find will make sure none are missed.
The permissions issue is with the config.php in the top-level folder, not with any of the others.

You are making this much more difficult than it needs to be. If you just use the zip file, unzip it, and then use FTP or whatever to copy the folders to the correct location, then all of the permissions should be correct already.
In any case, you are only changing the permissions for a handful of files and folders. It takes only 1 minute to do that, rather than the day you have taken trying to make this script.
Locked

Return to “[3.1.x] Support Forum”