Were you able to solve the problem?
You say $CFG->dataroot has permissions 755. Who is the owner, which group?
What is the owner and group of the Apache process?
Security and privacy
Moodle data directory files being deleted
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.