PDA

View Full Version : MoinMoin troubles



Nobber
3rd April 2007, 02:47 PM
I've been trying to install and configure MoinMoin on Fedora 6, but without success so far.

The wiki lives in /var/www/mywiki, which is where I've put wikiconfig.py and the 'data' and 'underlay' directories. Now, when I go to http://localhost/mywiki, I get an error message (in the browser) about /var/www/mywiki/data not existing or not being accessible. But the ownership and permissions on /var/www/mywiki/data are apache:apache and -rwxrwxr-x, which looks pretty accessible to me.

I dug further, and found that the error is being generated in the multiconfig.py python script that is part of MoinMoin. In the _check_directories() method in that script, it checks - all in one go - whether the directory /var/www/mywiki/data/pages exists, is readable, is writable, and is executable. For debugging purposes, I split the checks up to see which one was failing, and it turns out that the check for writability is failing. In other words, _check_directories() in multiconfig.py determines that the directory /var/www/mywiki/data/pages is not writable, and throws an exception. But the ownership and permissions on that directory are the same as for /var/www/mywiki/data, namely apache:apache and -rwxrwxr-x. I even tried setting the permissions to -rwxrwxrwx, but still no joy.

I'm stumped. Anyone have any clue why MoinMoin thinks /var/www/mywiki/data/pages is not writable?

baschti
3rd April 2007, 03:28 PM
hi,
do you have SElinux enabled?
check the permissions of that directory with: ls -lZ
so i guess moinmoin is running in the context of apache - if so, this directory should have SElinux permissions like system_u:object_r:httpd_sys_content_t

Nobber
3rd April 2007, 03:37 PM
hi,
do you have SElinux enabled?
Er, is that something you select during installation of the OS? I think I may have said yes to that, without fully understanding the implications... :D


check the permissions of that directory with: ls -lZ
so i guess moinmoin is running in the context of apache - if so, this directory should have SElinux permissions like system_u:object_r:httpd_sys_content_t
I will do that next time I'm at my Fedora machine. If I need to change the SELinux permissions, how do I do that?

Nobber
3rd April 2007, 04:19 PM
I came across this article about running Drupal on an SELinux-enabled OS:

SELinux may cause mysterious permission problems (http://drupal.org/node/50280)

I try disabling SELinux as described in that article, and see if it fixes the problem.

baschti
3rd April 2007, 06:03 PM
to check if you have SElinux enabled use
system-config-securitylevel
to change the SElinux context of a file use
chcon
i would recommend you to keep SElinux enabled especially if the wiki should be accessible via internet

Nobber
3rd April 2007, 06:23 PM
Thanks for that information. I'll try it out later. The wiki is just on my private home network (behind a router/firewall), so I don't have any worries about SELinux being disabled.

Nobber
4th April 2007, 12:12 AM
And I now have a functioning wiki. SELinux was the culprit after all.

= Woo hoo! =

:)