by Luis de Vasconcelos.
Have you checked the file permissions? The user that the web server (Apache in your case) is running under must be able to write to your Moodle application and Moodledata folders.