We've suddently been getting errors when trying to restore a course, we get all the way throught he process and the last step failes with:
Can not read file, either file does not exist or there are permission problems
Pointing to: http://docs.moodle.org/22/en/error/moodle/storedfilecannotread
Debugging returns:
Output buffer: Warning: copy(/home/moodledata/filedir/38/db/38db0fd979b2de2ab9369a883c6e1b4ac97ab6d9): failed to open stream: Permission denied in /var/www/html/lib/filestorage/file_storage.php on line 1132
I don't really know what would have caused this issue all of a sudden. To my knowledge nothing has been changed on the server.
Our existing moodledata folder has the following permissions:
drwxrws--- 9 root apache 4.0K Jan 18 04:30 moodledata
Folders inside moodledata are as:
drwxrwx--- 7 root apache 4.0K Dec 5 10:56 cache
drwxrwx--- 258 root apache 4.0K Aug 6 14:20 filedir
drwxrwx--- 4 root apache 4.0K Sep 22 10:13 filter
drwxrwx--- 2 root apache 4.0K Aug 6 14:20 lang
drwxrwx--- 3 root apache 4.0K Aug 6 14:20 repository
drwxrwx--- 12 root apache 4.0K Sep 6 14:21 temp
drwxrws--- 43 root apache 4.0K Jan 18 15:15 trashdir
The backup files are held in the repository/backups/to-restore folder which is an FTP repository that allows the manager to uplaod zip files
The file we are restoring is:
-rwxrwx--- 1 apache apache 30M Jan 18 09:47 CourseBackup1.zip
Any help tracing where the permission problem is coming from would be great.