moodledata directory

moodledata directory

by ivan perez -
Number of replies: 5

Using Moodle2.1

Dear Moodle support team,

I'm writing in the odd chance there may be a way to override the requirement that the moodledata directory reside outside the document root (htdocs, in my case).  My current hosting plan limits me to create directories under the document root, and I cannot proceed with the Installation of Moodle.

I understand the security risks at stake, but I also trust that the nature of the content to be published and the user profiles will not pose a significant threat.

I would much appreciate it if you could confirm if there's a way to override the requirements for the moodledata directory.

Yours,

Ivan.

Average of ratings: -
In reply to ivan perez

Re: moodledata directory

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
In reply to Mary Cooch

Re: moodledata directory

by ivan perez -

Dear Mary,

First, let me thank you for your prompt reply. I use an apache server, so I can restrict access through an .htaccess file. I created an .htaccess file which I saved in the data directory, looking like this:

# data dir
order deny,allow
deny from all

I also tried modifying the permissions on the folder to:

770, 750, 707 (and even 777 to see if this worked), but all settings were to no avail, and I'm still getting the error message "Dataroot location is not secure".

I just wonder if I'm doing something wrong.

Yours,

Ivan

In reply to ivan perez

Re: moodledata directory

by Andreas Giesen -

I had the same problem, even though in the documentation the option to use a .htaccess-file is mentioned, the installer would not let me go on that way.

What worked for me was to make a copy of the config-dist.php as config.php and to fill in the paths right here, including the path to my moodledata. (While at it I already filled in the data necessary to access the database, too.) 

After that I restarted the installation and could go on with it without any further warning...