Register
It is currently Wed Nov 22, 2017 5:09 am

Install phpBB3 (3.0.10), get "Found, Unwritable"


All times are UTC


Post new topic Reply to topic  [ 8 posts ] 
Author Message
 PostPosted: Sat Jan 14, 2012 3:00 pm   
New Member

Joined: Sat Jan 14, 2012 1:56 pm
Posts: 4
I'm attempting to install phpBB3 (3.0.10) on a brand-new installation of Fedora 16. Apache says this:

Quote:
Server Version: Apache/2.2.21 (Unix) PHP/5.3.8
Server Built: Sep 13 2011 12:26:57
Server loaded APR Version: 1.4.5

Compiled with APR Version: 1.4.5
Server loaded APU Version: 1.3.12
Compiled with APU Version: 1.3.12
Module Magic Number: 20051115:30
Hostname/port: 5.0.1.122:80

Timeouts: connection: 60 keep-alive: 5
MPM Name: Prefork
MPM Information: Max Daemons: 256 Threaded: no Forked: yes

Server Architecture: 64-bit
Server Root: /etc/httpd

Config File: /etc/httpd/conf/httpd.conf
Server Built With:
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

MySQL is installed and says:
Quote:
MySQL client version: 5.5.18


When I start the phpBB3 install, it's all good except:

Quote:
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


This is what those items look like on disk:

drwxrwxrwx. 2 apache apache 4096 Jan 13 20:08 cache
drwxrwxrwx. 2 apache apache 4096 Jan 13 20:08 files
drwxrwxrwx. 2 apache apache 4096 Jan 13 20:08 store

-rwxrwxrwx. 1 apache apache 0 Jan 14 09:25 config.php

images/avatars:
drwxrwxrwx. 2 apache apache 4096 Jan 13 20:08 upload


The phpBB folks told me to ask elsewhere, as the problem isn't theirs.

It seems clear to me that my problem is a config issue, either with the Apache setup or the PHP setup - but that's where my brain stops being useful.

Any thoughts?

Thanks in advance!


Top
 Profile  
 PostPosted: Sat Jan 14, 2012 4:14 pm   
Ultimate Member
User avatar

Joined: Tue Jun 29, 2004 1:56 am
Posts: 2277
Location: Queen Charlotte B. C. Canada
Php can only write to folders that it owns or have wide open permissions.
The safest way may be to change ownership of the folders to User: wwwrun Group: www

as root:
chown wwwrun:www /cache
chown wwwrun:www /files
chown wwwrun:www /store
chown wwwrun:www /images/avatars/upload

Your "config.php" could have it's permissions changed during the install then changed back.
cd /directory_containing_the_file
chmod 666 config.php

going back after the install for safety
chmod 644 config.php

Note: I do not run phpBB3 or Fedora, but I know php quite well.

_________________
SuSE 8.0, 8.2, 9.0, 9.1, 9.2, 9.3, 10.0, 10.1, 10.2, 10.3, 11.0, 11.1, 11.2, 11.3, 11.4, 12.0, 12.1, 12.2, 12.3
Live CDs Mepis 8.0, Puppy 5.1, netbook- Zenwalk 6.2


Top
 Profile WWW  
 PostPosted: Sat Jan 14, 2012 4:54 pm   
New Member

Joined: Sat Jan 14, 2012 1:56 pm
Posts: 4
Thanks for the reply. Unfortunately, httpd is running as "apache" - hence the fact that the folder/files are already owned by 'apache.apache'

I checked to be certain, and there is no 'wwwrun' user, nor 'www' group.

:?


Top
 Profile  
 PostPosted: Sat Jan 14, 2012 5:24 pm   
Ultimate Member
User avatar

Joined: Tue Jun 29, 2004 1:56 am
Posts: 2277
Location: Queen Charlotte B. C. Canada
earl7399 wrote:
Thanks for the reply. Unfortunately, httpd is running as "apache" - hence the fact that the folder/files are already owned by 'apache.apache'

I checked to be certain, and there is no 'wwwrun' user, nor 'www' group.

:?

Have a look at your "php.ini", possibly located in /etc/php5/apache2/
if "safe_mode = On" it will restrict what php can do.

Note if you change it you will have to reboot apache for the change to be effective.

_________________
SuSE 8.0, 8.2, 9.0, 9.1, 9.2, 9.3, 10.0, 10.1, 10.2, 10.3, 11.0, 11.1, 11.2, 11.3, 11.4, 12.0, 12.1, 12.2, 12.3
Live CDs Mepis 8.0, Puppy 5.1, netbook- Zenwalk 6.2


Top
 Profile WWW  
 PostPosted: Sat Jan 14, 2012 6:21 pm   
New Member

Joined: Sat Jan 14, 2012 1:56 pm
Posts: 4
mushroom wrote:
Have a look at your "php.ini", possibly located in /etc/php5/apache2/
if "safe_mode = On" it will restrict what php can do.

Note if you change it you will have to reboot apache for the change to be effective.

I found the php.ini in /etc/php.ini - and it says "safe_mode = Off"

I checked the online doco @ http://www.php.net/manual/en/ini.sect.safe-mode.php, and it says "This feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged." Does anyone know if the functionality was moved or changed? The php.net site seems hard to reach, and I have been unsuccessful finding useful info.


Top
 Profile  
 PostPosted: Sat Jan 14, 2012 6:56 pm   
Ultimate Member
User avatar

Joined: Tue Jun 29, 2004 1:56 am
Posts: 2277
Location: Queen Charlotte B. C. Canada
Until you can get a better solution, you can try changing the permissions of the directories to 777 to get going.

chmod 777 /needed_ directory

_________________
SuSE 8.0, 8.2, 9.0, 9.1, 9.2, 9.3, 10.0, 10.1, 10.2, 10.3, 11.0, 11.1, 11.2, 11.3, 11.4, 12.0, 12.1, 12.2, 12.3
Live CDs Mepis 8.0, Puppy 5.1, netbook- Zenwalk 6.2


Top
 Profile WWW  
 PostPosted: Sun Jan 15, 2012 3:01 am   
New Member

Joined: Sat Jan 14, 2012 1:56 pm
Posts: 4
Following advice I actually got on the phpBB.org forum, I ran the following commands and then re-ran the phpBB3 test, with perfect results!
Code:
chcon -t httpd_sys_content_rw_t /var/www/html/forum/cache/
chcon -t httpd_sys_content_rw_t /var/www/html/forum/files/
chcon -t httpd_sys_content_rw_t /var/www/html/forum/store/
chcon -t httpd_sys_content_rw_t /var/www/html/forum/config.php
chcon -t httpd_sys_content_rw_t /var/www/html/forum/images/avatars/upload

I guess it's been too long - I've never heard of SELinux!


Top
 Profile  
 PostPosted: Sun Jan 15, 2012 5:23 am   
Ultimate Member
User avatar

Joined: Tue Jun 29, 2004 1:56 am
Posts: 2277
Location: Queen Charlotte B. C. Canada
earl7399 wrote:
I guess it's been too long - I've never heard of SELinux!

Glad you got it sorted out, Thanks for letting us know 8)

I have heard of SELinux, but never worked with it.

_________________
SuSE 8.0, 8.2, 9.0, 9.1, 9.2, 9.3, 10.0, 10.1, 10.2, 10.3, 11.0, 11.1, 11.2, 11.3, 11.4, 12.0, 12.1, 12.2, 12.3
Live CDs Mepis 8.0, Puppy 5.1, netbook- Zenwalk 6.2


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2012 phpBB Group
© 2003 - 2012 USA LINUX USERS GROUP