Page 1 of 2

Install Moodle (moodledata folder)

Posted: Tue Jul 19, 2016 12:38 pm
by warcos
I try to install moodle but moodledata folder need special permission.

Image

path for moodle folder: ~/web/koquistudio.com/public_html/moodle
path for moodledata folder: ~/web/koquistudio.com/moodledata

Display Warning in the top of the page:

Warning: file_exists(): open_basedir restriction in effect. File(/home/admin/web/koquistudio.com/moodledata) is not within the allowed path(s): (/home/admin/web/koquistudio.com/public_html:/home/admin/tmp) in /home/admin/web/koquistudio.com/public_html/moodle/install.php on line 333

Warning: is_writable(): open_basedir restriction in effect. File(/home/admin/web/koquistudio.com) is not within the allowed path(s): (/home/admin/web/koquistudio.com/public_html:/home/admin/tmp) in /home/admin/web/koquistudio.com/public_html/moodle/install.php on line 337

Then this message:

Parent directory (/home/admin/web/koquistudio.com) is not writeable. Data directory (/home/admin/web/koquistudio.com/moodledata) cannot be created by the installer.

Re: Install Moodle (moodledata folder)

Posted: Wed Jul 20, 2016 1:08 pm
by skurudo
You can change path for moodledata?

Something like:
~/web/koquistudio.com/public_html/moodledata

Re: Install Moodle (moodledata folder)

Posted: Thu Jul 21, 2016 3:41 pm
by warcos
I try that, but moodle do not accept move the moodledata for security.

Look this:

Image

Re: Install Moodle (moodledata folder)

Posted: Wed Aug 24, 2016 11:21 am
by skurudo
If so, add additional location in php_value open_basedir

Re: Install Moodle (moodledata folder)

Posted: Sun Aug 28, 2016 11:02 pm
by dpeca
Yes, in /home/admin/conf/web/apache2.conf you can change path to one folder level up.

In that file you can find this:

Code: Select all

php_admin_value open_basedir /home/admin/web/YOUR-HOSTNAME.com/public_html:/home/admin/tmp
Simply remove public_html/
So it will be:

Code: Select all

php_admin_value open_basedir /home/admin/web/YOUR-HOSTNAME.com:/home/admin/tmp
And then restart Apache.

@skurudo
It will be good idea that in future versions Vesta allows to edit open_basedir path when you add/edit WEB domain (I mean on the same form when you can turn on/off SSL).

Re: Install Moodle (moodledata folder)

Posted: Mon Aug 29, 2016 8:33 am
by skurudo
@dpeca,
I think a little secure add catalog and don't share all folders in domain folder:

Code: Select all

php_admin_value open_basedir /home/admin/web/YOUR-HOSTNAME.com/public_html:/home/admin/web/YOUR-HOSTNAME.com/moodledata:/home/admin/tmp
dpeca wrote:@skurudo
It will be good idea that in future versions Vesta allows to edit open_basedir path when you add/edit WEB domain (I mean on the same form when you can turn on/off SSL).
It's good idea, added -> https://bugs.vestacp.com/issues/371

Re: Install Moodle (moodledata folder)

Posted: Mon Aug 29, 2016 2:16 pm
by dpeca
Yes, just correct line, behind : should be only path, not php_admin_value
This way:

Code: Select all

php_admin_value open_basedir /home/admin/web/YOUR-HOSTNAME.com/public_html:/home/admin/web/YOUR-HOSTNAME.com/moodledata:/home/admin/tmp
Cheers and thank you for posting idea on https://bugs.vestacp.com/issues/371 :)

Re: Install Moodle (moodledata folder)

Posted: Mon Aug 29, 2016 2:52 pm
by skurudo
dpeca wrote:Yes, just correct line, behind : should be only path, not php_admin_value
Yep, sorry, my bad. U're right.

Re: Install Moodle (moodledata folder)

Posted: Mon Nov 14, 2016 9:26 am
by hcjsy
just use the private folder

Re: Install Moodle (moodledata folder)

Posted: Wed Dec 07, 2016 7:55 am
by skurudo
hcjsy wrote:just use the private folder
Hmm.. I don't think it'll work for this case.