In this page it's offered to set moodledata directory Owner 'apache' and set 770 permissions so user and group (in this case apache) will be able to create new files/folders in moodledata directory.
What about files?
Does Moodle modify any files in moodledata directory or it's just create new ones?
What permissions do we need to set on files in moodledata directory?
apache Group need to have permissions to delete files from moodledata if they are deleted in Moodle course?