Moodle 2.0.1 Installation Problem with Plesk & CentOS5

Moodle 2.0.1 Installation Problem with Plesk & CentOS5

by Ian Wright -
Number of replies: 7
I have installed Moodle 2.0.1 FILES on a CentOS5 server with a web site domain created with Parallels Plesk Panel.  On running <domain>/install.php, on page 2 Confirm paths, I get some kind of permissions error I don't understand.  I could sure use some advice.
____________________________________________________
At top of the page are the warnings:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/vhosts/prince2cbt.biz/moodledata) is not within the allowed path(s): (/var/www/vhosts/prince2cbt.biz/httpdocs:/tmp) in /home/vhosts/prince2cbt.biz/httpdocs/moodle/install.php on line 305

Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/home/vhosts/prince2cbt.biz) is not within the allowed path(s): (/var/www/vhosts/prince2cbt.biz/httpdocs:/tmp) in /home/vhosts/prince2cbt.biz/httpdocs/moodle/install.php on line 309
----------------------------------------------
(Question: where did the :/tmp come from, I wonder?)
... and at the bottom of the page:
Web address http://prince2cbt.biz/moodle
Moodle directory /home/vhosts/prince2cbt.biz/httpdocs/moodle
Data directory /home/vhosts/prince2cbt.biz/moodledata
Parent directory (/home/vhosts/prince2cbt.biz) is not writeable.
Data directory (/home/vhosts/prince2cbt.biz/moodledata) cannot be created by the installer.
----------------------------------
Note: In Plesk, /home/ == /var/www/
My starting point was the guidelines at the very useful-looking doc.moodle.org/en/CentOS_Linux_installation, (skipping the Zend server as PHP5.3.5 and MySQL5.1.56 are already installed), setting the owners/permissions as per "Configuring file structure", except that Plesk points a domain name to /home/vhosts/<domainname>/httpdocs.

I have tried changing the owner for both the domain directory and moodle data directory from root to bizadmin (the Plesk ftp username), and back, and I've tried combinations of group for apache, psaserv (the Plesk group), psacln (the Plesk client) and bizadmin - all with the same result: the domain directory is not writable and the data directory cannot be created.
Right now the domain directory is owned by root:psaserv and the folders & files (including /moodle/) is owned by root:psacln, all with full ugo rwx permissions, eg:
drwxrwxrwx 8 root psaserv 4096 Mar  8 15:17 httpdocs
_and_
drwxrwxrwx 41 root psacln  4096 Mar  8 00:36 moodle

(as suggested by http://www.orware.net/blog/item/correct-httpdocs-permissions.html)

If anyone can point me to the correct owner/group configuration to satify the triangular needs of Moodle 2.0, Parallels Plesk Panel and CentOS5, I would be most grateful

Average of ratings: -
In reply to Ian Wright

Re: Moodle 2.0.1 Installation Problem with Plesk & CentOS5

by Ian Wright -

Problem solved - I think!

The domain hosting configuration was changed from "Apache module" to "FastCGI application".  The installation is not yet complete, but at least I'm past the open_basedir problem and hopefully this'll help someone else...

Average of ratings: Useful (2)
In reply to Ian Wright

Re: Moodle 2.0.1 Installation Problem with Plesk & CentOS5

by Sean Russell -

Ian, you are a legend. I've been struggling with this problem for weeks. After seeing this post I set my hosting space to 'FastCGI application' and now I can continue with the setup! Thankyou!!

In reply to Ian Wright

Re: Moodle 2.0.1 Installation Problem with Plesk & CentOS5

by Clint Adair -

Thanks for this!  I was beating my head against the wall way too long on this. 

Have you encountered any issues running Moodle with this change to the php setting?

In reply to Clint Adair

Re: Moodle 2.0.1 Installation Problem with Plesk & CentOS5

by mandy honeyman -

Ha! yes that makes sense, but now I can't find where the setting gets changed on the plesk panel, ho hum.

edit: I found it, go to Websites & Domains tab and click on the domain you are using for installation at bottom of page.

But I am still getting errors:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. from line 309.

Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. from line 309

still seem to be addressing httpdocs:/tmp for some reason.

any help would be gratefully received.

In reply to mandy honeyman

Re: Moodle 2.0.1 Installation Problem with Plesk & CentOS5

by mandy honeyman -

For those battling with open_basedir issues and a Plesk set up.

My hosting service sent me to this knowledgebase article:

http://kb.parallels.com/432

I will report back on it's success or not.

Mandy

In reply to Ian Wright

Re: Moodle 2.0.1 Installation Problem with Plesk & CentOS5

by Gilvan Marques -
Picture of Translators

Thanks a lot Ian.

In reply to Gilvan Marques

Re: Moodle 2.0.1 Installation Problem with Plesk & CentOS5

by Marek Adamczyk -

When I switch from Apache Module to FastCGI I get Internal Server Error and I am running centos 5.5 with plesk.

Any ideas?

Thanks!

Marek