Bug 668386 - SELinux prevents Dokuwiki from writing its own config files
Summary: SELinux prevents Dokuwiki from writing its own config files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dokuwiki
Version: 14
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: ---
Assignee: Andrew Colin Kissa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-10 11:14 UTC by Joerg_H
Modified: 2011-02-03 17:58 UTC (History)
1 user (show)

Fixed In Version: dokuwiki-0-0.6.20101107.a.el5
Clone Of:
Environment:
Last Closed: 2011-01-26 20:58:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joerg_H 2011-01-10 11:14:24 UTC
== Description of problem:
SELinux prevents Dokuwiki from writing its own config files.

== Version-Release number of selected component (if applicable):
dokuwiki-0-0.4.20091225.c.fc13.noarch on a stock Fedora 14 system.

== How reproducible:
Perfectly well, done this on two machines ;-)

== Steps to Reproduce:
1. yum install Dokuwiki. 

2. At this point, Dokuwiki works well but there is no access control and no configuration via the web interface possible. To enable this:

2a. append the following to /etc/dokuwiki/local.php:
$conf['useacl']      = 1;      
$conf['superuser']   = '@admin';
$conf['passcrypt']   = 'md5';  

2b. Append the following to /etc/dokuwiki/users.auth.php (this creates user "admin" with password "admin"):
admin:21232f297a57a5a743894a0e4a801fc3:Admin:jha@localhost:admin
  
2c. /etc/init.d/httpd restart

3. Log into http://localhost/dokuwiki/ (as admin)

4. Go to Admin > Configuration Settings, change something, then "Save" (or go to User Management and add a user). 

== Actual results:

After step 4, you will get an error message that the config cannot be saved (or user cannot be added). 

At the same time, SElinux will complain and/or write messages into /var/log/messages.

== Expected results:

Config should be saved without errors ;-)


== Additional info:

This step resolves the problem for me:
chcon -R -t httpd_sys_content_rw_t '/etc/dokuwiki'

This command should be performed automagically when Dokuwiki is installed.

Comment 1 Joerg_H 2011-01-10 13:28:02 UTC
Just for the record, this might also be a good occasion to update to Dokuwiki 2010-11-07.

Cheers,

- Joerg

Comment 2 Joerg_H 2011-01-11 12:38:50 UTC
.. and another one, same topic and same reason: In the F14 default configuration, dokuwiki cannot download and install plugins through Admin > Plugin Manager. 

To fix this:

chcon -R -t httpd_sys_content_rw_t '/usr/share/dokuwiki/lib/plugins'

Comment 3 Fedora Update System 2011-01-17 22:44:08 UTC
dokuwiki-0-0.6.20101107.a.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/dokuwiki-0-0.6.20101107.a.fc13

Comment 4 Fedora Update System 2011-01-17 22:44:44 UTC
dokuwiki-0-0.6.20101107.a.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/dokuwiki-0-0.6.20101107.a.fc14

Comment 5 Fedora Update System 2011-01-17 22:45:23 UTC
dokuwiki-0-0.6.20101107.a.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/dokuwiki-0-0.6.20101107.a.el5

Comment 6 Andrew Colin Kissa 2011-01-17 22:49:57 UTC
I have created a sub package dokuwiki-selinux which will provide support for
running with selinux due to the number of dependencies that get pulled in.

Users who do not want all the dependencies can just install plain dokuwiki.

REF: https://fedoraproject.org/wiki/PackagingDrafts/SELinux

Comment 7 Fedora Update System 2011-01-18 17:25:30 UTC
dokuwiki-0-0.6.20101107.a.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dokuwiki'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/dokuwiki-0-0.6.20101107.a.el5

Comment 8 Fedora Update System 2011-01-26 20:58:02 UTC
dokuwiki-0-0.6.20101107.a.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2011-01-26 20:59:11 UTC
dokuwiki-0-0.6.20101107.a.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2011-02-03 17:58:10 UTC
dokuwiki-0-0.6.20101107.a.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.