Databases: Can't specify a moodledata directory

Databases: Can't specify a moodledata directory

by Karl Gimblett -
Number of replies: 6

Hi guys,

Sorry for being such a noobie but I have an issue which is strange since I've installed and run moodle before.

My home directory is:

/hsphere/local/home/juliegimblett/mywebsite.com/moodle

And I've tried to specify this as the moodledata directory:

/hsphere/local/home/juliegimblett/moodledata

But I then get this message:

The 'Data Directory' you specified could not be found or created. Either correct the path or create that directory manually.

I'd had a look through the installation FAQ and through otehr how-tos but I don't seem to be able to find where the problem lies. I've also tried changing the permissions of the folder so that it is protected but to no avail.

An help at all would be greatly appreciatred,

Karl Gimblett.

Average of ratings: -
In reply to Karl Gimblett

Re: Databases: Can't specify a moodledata directory

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You need to create the moodledata folder yourself (mkdir moodledata in /hsphere/local/home/juliegimblett/).

Then you need to make sure the web server can write to that folder. (chmod a+wx moodledata)
In reply to Tim Hunt

Re: Databases: Can't specify a moodledata directory

by Karl Gimblett -

Thanks for that, I have indeed created a directory called moodledata and given full read/write privilages.

Still no joy though,

Thanks again,

Karl.

In reply to Karl Gimblett

Re: Databases: Can't specify a moodledata directory

by Robert Saari -

If you're using a Windows server, make sure you're using the proper format in the config.php file for the data directory.  It should be similar to the following:

$CFG->dataroot  = 'D:\\Inetpub\\wwwroot\\moodle_data';

Also remember that it's case-sensitive.

In reply to Karl Gimblett

Re: Databases: Can't specify a moodledata directory

by The Edifier -
I had a similar problem. It was overcome when i checked the read, write, execute, permissions boxes for both user as well as other.

I do not know whether this is in any way insecure.

I was breaking my head over this. Thanks for the discussion. I could eliminate some unnecessary trials i would have made otherwise.
In reply to Tim Hunt

Re: Databases: Can't specify a moodledata directory

by Tariq Adel Al Ammadi -
In addition, if using linux, you need to make sure that the web server can write to the directory.

So you will need to issue the following command:

chown -R www-data /hsphere/local/home/juliegimblett/moodledata

In reply to Tariq Adel Al Ammadi

Re: Databases: Can't specify a moodledata directory

by Karl Gimblett -
I eventually had to use:

/hsphere/local/home/myname/mywebsite.com/moodledata

This was advised by my webhosting guys, I was nearly pulling my hair out as I was sure I'd already tried this wink

Thanks for that Tariq, I'd used my webby file manager to use chmod to modify folder permissions!

Thanks for all the comments folks, you've been very helpful indeed.

Karl.