A Moodle™ install that looks healthy on /login/index.php can still be serving student submissions, session files and backup zips from a directory the browser can reach. The directory is $CFG->dataroot . Moodle stores uploaded files there on purpose. The web server is not supposed to.
The official check is Site administration → Reports → Security checks. That report is a start. It is not proof. The proof is a request from the public hostname that either 404s or is refused, against a file you know exists on disk.
What dataroot actually holds
On a typical production host:
/var/moodledata/filedir/ # hashed copies of every uploaded file /var/moodledata/sessions/ # PHP session files if you still use file sessions /var/moodledata/temp/ # backups, imports, unzip leftovers /var/moodledata/cache/ # MUC file store /var/moodledata/localcache/ /var/moodledata/trashdir/
Enter fullscreen mode
Exit fullscreen mode
If that tree sits under the document root — public_html/moodledata , www/data , htdocs/moodledata — a…