Hi all, I've been seeing these messages popping up for me occasionally and I think I've tracked down the cause. The full error is:
PHP Warning: chmod(): Operation not permitted in /var/....../lib/filestorage/file_storage.php on line 2194, referer: http://........./course/delete.php?id=103
Looking at the code, that line performs a chmod on trash files: https://github.com/moodle/moodle/blob/master/lib/filestorage/file_storage.php#L2194
Our Moodledata directory is set to root:apache permissions with 0660 on the files. But even though the apache user is allowed to write the files, because it is not the owner, it's not allowed to chmod the files.
I'm thinking now the proper ownership on the moodledata directory be apache:apache, What are people's thoughts?