dataroot is not configured properly

dataroot is not configured properly

by LIsa Cox -
Number of replies: 3

I have used Moodle in the past, but it has been years. I am trying to do a new install and get the following error message when going to https://texas-food-handler.com/moodle

Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.

In config.php I am using:

 $CFG->dataroot  = 'https://www.texas-food-handler.com/moodle/moodledata';

When I was on this forum before, the help was incredible. I love this community. If someone could point out what I am doing wrong, I would be greatly appreciative!



Average of ratings: -
In reply to LIsa Cox

Re: dataroot is not configured properly

by Ken Task -
Picture of Particularly helpful Moodlers

 $CFG->dataroot value is a path ... full path to where the manually created 'moodledata' directory resides.

IF on CentOS 6 and 7, as an example, and using a VPS (not a shared server) that more than likely would be in

/var/www/moodledata

and the ownerships/permissions on moodledata would be for the web server user ... again, if server were CentOS 6 or 7 on a VPS, those would be: apache (for user) and apache (for group).

Use your cPanel to find info on your server.

When in doubt consult with the helpdesk of your provider about your specific server setup.

'spirit of sharing', Ken


In reply to Ken Task

Re: dataroot is not configured properly

by LIsa Cox -

Thank you very much for your response. You sent me on a linux chase. The correct value that worked was home/texasfoodhandler/moodledata


In reply to LIsa Cox

Re: dataroot is not configured properly

by Ken Task -
Picture of Particularly helpful Moodlers

Welcome. ... 'linux chase' ... hope it didn't take you long ... there was no way I could tell you exactly where your moodledata directory should be or was located.   Much depends upon hosting and how hosting providers have setup customers accounts/servers.

Some providers, for an example, have /srv/customerIDnumber/ .... rather than your /home/siteoraccountname/

All is well that ends well!

'spirit of sharing', Ken