Permissions problem perhaps?
Is your data file area definitely write-able by the web server application. The easiest is to ensure that all the directories and files are owned by the same user/group that the httpd server runs under.
You don't say what you are running, but on Unix something like...
chown -R apache:apache moodle_data (redhat et al)
chown -R nobody:nogroup moodle_data (suse...)