Ask Your Question
1

What security contexts need to change to allow phpBB to write to directories.

asked 2016-07-27 07:57:13 -0500

paulhr gravatar image

I am trying to install phpBB 3.1.9 on Fedora 23 with the current php runtime installed by dnf.

There is a preInstall check that phpBB does that makes sure phpBB can write to certain directories and update certain files.

phpBB must be able to write to the below directories. /var/www/html/usque/bb /var/www/html/usque/bb/files /var/www/html/usque/bb/cache /var/www/html/usque/bb/store /var/www/html/usque/bb/store/images/avatars/upload All users can write to these directories because that have the drwxrwxrwx but the preinstall test still says it can not write to the directories. The idea was brought up that it may be a SELinux security contexts issue. I have never even heard of the SELinux security context before. After reading up on it I still don't see how to change the setting, or which ones to change.

/var/www/html/usque/bb/files
unconfined_u :object_r :httpd_sys_content_t :s0 index.htm unconfined_u :object_r :httpd_sys_content_t :s0 . unconfined_u :object_r :httpd_sys_content_t :s0 ..

phpBB must be able to update below file. How to change the SELinux security context settings, or which ones to change?

/var/www/html/usque/bb/config.php /var/www/html/usque/bb/phpbb/db/migration/tool/config.php /var/www/html/usque/bb/phpbb/config/config.php /var/www/html/usque/bb/phpbb/di/extension/config.php /var/www/html/usque/bb/phpbb/search/sphinx/config.php

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-07-27 13:32:03 -0500

aeperezt gravatar image

You need to do

chcon -R -t httpd_sys_content_t /var/www/html/usque

That will add all the permits recursive to all folders below usque. On the other hand you need to set folder to 755 and have apache own them

sudo chown apache:apache -R /var/www/html/usque/bb sudo chmod 777 /var/www/html/usque/bb/config.php /var/www/html/usque/bb/phpbb/db/migration/tool/config.php /var/www/html/usque/bb/phpbb/config/config.php /var/www/html/usque/bb/phpbb/di/extension/config.php /var/www/html/usque/bb/phpbb/search/sphinx/config.php

That will be on setup only after that you need to set them to 644

Good luck

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-07-27 07:57:13 -0500

Seen: 141 times

Last updated: Jul 27 '16