Creating Moodle site data directory/Data directory
The Moodle data directory (often called moodledata) contains course, user and other site information that is used by the Moodle code. It is usually created and placed as part of the Moodle site install process.
Security warning: It is CRITICAL that this directory is NOT accessible directly via the web. If someone from the web can enter a url in their browser and reach any of the data directory's sub directories, then your site will have major problems. There are some users of the web who are NOT friendly and enjoy finding weaknesses and then causing havoc.
- Tip: Some webhost automatic scripts may override the Moodle installer defaults.
Sub directories
For general information purposes, here is a brief description of a moodledata folder:
- Courses folder are labeled with their course id numbers
- cashe
- lang - holds other language directories, or edited language php files
- sessions - holds session information for users
- temp - has subfolders for backup, csvimport, unzip, typo3temp and other directories
- upgradelogs - hold logfiles generated when Moodle upgraded
- user - each user has a folder that is labeled with their user id
See also
Creating Moodle site data directory - When the data directory is not created in the install process
Development:File API - the 2.0 Moodle file handling system uses the data director