$ 0 0 by Howard Miller. $CFG->dataroot (aka moodledata) MUST be writeable by your web server user. In most cases (although maybe not on a shared server) making all the files writeable by "everyone" is the easiest solution.