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

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

by worawat wasanapreecha -
Number of replies: 11

Hi 

I am updating moodle form version 3.0 to version 3.2 but have problem below. How to solve it ?


error message::

Warning: file_exists(): open_basedir restriction in effect. File(/home/admin/web/xxx/moodledata) is not within the allowed path(s): (/home/admin/web/xxx/public_html:/home/admin/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube) in /home/admin/web/xxx/public_html/moodle/install.php on line 333

Warning: is_writable(): open_basedir restriction in effect. File(/home/admin/web/xxx) is not within the allowed path(s): (/home/admin/web/xxx/public_html:/home/admin/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube) in /home/admin/web/xxx/public_html/moodle/install.php on line 337


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


detail paths

Moodle directory :: /home/admin/web/xxx/public_htm/lmoodledata
Data directory :: /home/admin/web/xxx/moodledata

i am try setting open_basedir, create moodledata with myself and set permission chmod 777 but it's show same error.

open_basedir
/home/admin/web/xxx/moodledata

Thank You.




Average of ratings: -
In reply to worawat wasanapreecha

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

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Ideally, turn off open_basedir. 

If you can't do that then you need to know where you are allowed to put your 'moodledata' directly. You may need to speak to your server administrator/support about that.

Moodle doesn't really play nicely with open_basedir restrictions 

In reply to Howard Miller

ตอบ: Re: Parent directory (/home/admin/web/xxx) is not writeable. Data directory (/home/admin/web/xxx/moodledata) cannot be created by the installer.

by worawat wasanapreecha -

Hi Howard Miller,

Now i turn off open_basedir it show same error. It's not working.

In reply to worawat wasanapreecha

Re: ตอบ: Re: Parent directory (/home/admin/web/xxx) is not writeable. Data directory (/home/admin/web/xxx/moodledata) cannot be created by the installer.

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you turned off open_basedir and you still get the open_basedir error then, sorry, you didn't turn it off. 

If you made changes in php.ini, did you restart the web server afterwards. You need to if you didn't. 

In reply to Howard Miller

ตอบ: Re: ตอบ: Re: Parent directory (/home/admin/web/xxx) is not writeable. Data directory (/home/admin/web/xxx/moodledata) cannot be created by the installer.

by worawat wasanapreecha -

Hi

Howard Miller,

Sure after config php.ini i am restart service every time.

In reply to worawat wasanapreecha

Re: ตอบ: Re: ตอบ: Re: Parent directory (/home/admin/web/xxx) is not writeable. Data directory (/home/admin/web/xxx/moodledata) cannot be created by the installer.

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Is it the *same* messages (the open_basedir) problem?

If so, you didn't turn it off. Is it possible that you are editing the wrong php.ini file (or there is a something else that is enabling open_basedir)?

*Something* is causing it to be enabled. 

In reply to Howard Miller

ตอบ: Re: ตอบ: Re: ตอบ: Re: Parent directory (/home/admin/web/xxx) is not writeable. Data directory (/home/admin/web/xxx/moodledata) cannot be created by the installer.

by worawat wasanapreecha -
I am editing this file (follow path)




It's right format? (xxx is my domain)




and this message show at phpinfo.php

                                                            

open_basedir/home/admin/web/xxx/public_html:/home/admin/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube /home/admin/web/xxx/moodledata


In reply to worawat wasanapreecha

Re: ตอบ: Re: ตอบ: Re: Parent directory (/home/admin/web/xxx) is not writeable. Data directory (/home/admin/web/xxx/moodledata) cannot be created by the installer.

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I am guessing by your folder structure that you have a hosted site.  These sites often have a requirement for .htaccess file in the moodle directory - you might check that is not overriding your php.ini file.

Also, some hosts do not allow web accessible files/folders outside of the public_html folder and that might be causing your issue too.

In reply to Emma Richardson

ตอบ: Re: ตอบ: Re: ตอบ: Re: Parent directory (/home/admin/web/xxx) is not writeable. Data directory (/home/admin/web/xxx/moodledata) cannot be created by the installer.

by worawat wasanapreecha -

Hi, Emma Richardson

Thank for answer i will checking config my server again.

In reply to worawat wasanapreecha

ตอบ: Re: ตอบ: Re: ตอบ: Re: Parent directory (/home/admin/web/xxx) is not writeable. Data directory (/home/admin/web/xxx/moodledata) cannot be created by the installer.

by worawat wasanapreecha -

Good suggestion!

i can install moodle configured in apache2.conf it's working. But now have new problem below picture why moodle appearance? I tried remove trash folder it's same appearance.




In reply to worawat wasanapreecha

ตอบ: Re: ตอบ: Re: ตอบ: Re: Parent directory (/home/admin/web/xxx) is not writeable. Data directory (/home/admin/web/xxx/moodledata) cannot be created by the installer.

by worawat wasanapreecha -

Update

But have new probles.

- Some picture and all files lose how to recovery ?


- When click one of subject it's download php of moodle files (Such as index.php,View.php).


- Link site Admin not working when click it show icon downloading.

In reply to worawat wasanapreecha

ตอบ: Re: ตอบ: Re: ตอบ: Re: Parent directory (/home/admin/web/xxx) is not writeable. Data directory (/home/admin/web/xxx/moodledata) cannot be created by the installer.

by worawat wasanapreecha -

Upload moodledata binary format can solve all problems.