Backup Temp Dir error message

Backup Temp Dir error message

by Jonathan Dowell -
Number of replies: 4

3.5 user, AWS servers:  When I & my teachers try to duplicate assignments & some other things, we get the error message error/cannot_empty_backup_temp_dir.  When I researched this in Moodle Docs & Help, I was told to make sure I had permission.  How do I do this?

Average of ratings: -
In reply to Jonathan Dowell

Re: Backup Temp Dir error message

by Ken Task -
Picture of Particularly helpful Moodlers

Don't host on AWS but if it's a Linux, ownerships/permissions normally set in Linux via ssh session to server.

Since Linux's use pretty much the same basic 'chown' and 'chmod' commands those are the commands one would use on /path/to/moodledata

To check ownerships/permissions on moodledata directory, first list it:

ls -ld moodledata

That will show **something** like:

drwxrwxr-x. 14 apache apache 4096 Sep 17 05:58 moodle35data

Do the same for moodledata/temp/

[root@sos moodle35data]# ls -ld temp
drwxrwxr-x. 7 apache apache 4096 Sep 16 06:50 temp

The d is a directory.   The rwx is read/write/execute

The 3 rwx's ... owner first set of 3, group is the second set of rwx, and the last set of rwx is 'others' ... that's all users in the globe.

**EXAMPLE for moodledata/temp/

cd /path/to/moodledata/

chmod ug+rwx temp -R

give user,group read/write/execute on directory temp and all directories files in temp (the -R is recursive).

While in the ssh shell, you should have an online manual for commands (called 'man').  To see all the options and technical explanations for the 'chmod' command, use the following command:

man chmod

'spirit of sharing', Ken




In reply to Jonathan Dowell

Re: Backup Temp Dir error message

by Ken Task -
Picture of Particularly helpful Moodlers

On thinking about this some more .... and Oogling ... question:

Is your moodledata in an S3 Bucket or some sort of bucket on Amazon?   Different beast from 'typical' moodledata on attached drive or a partiton on Linux server - which is what my previous response may have mistakendly 'assumed'.   Sorry 'bout that!

So ....

https://www.google.com/search?q=AWS+set+ownership+permissions

and this

https://docs.moodle.org/35/en/Installation_Guide_for_Installing_on_Amazon_EC2

Please share how you are setup.   Surely there is someone in these forums that host on Amazon.

'spirit of sharing', Ken


In reply to Ken Task

Re: Backup Temp Dir error message

by Jonathan Dowell -

Thanks; I've passed this on to our site admin.  I finally found the Moodle Doc on this issue:

"error/moodle/cannot empty backup temp dir

Note: You are currently viewing documentation for Moodle 3.1. Up-to-date documentation for the latest stable version of Moodle is probably available here: error/moodle/cannot empty backup temp dir.

This results from a file permissions error in the moodledata directory. Ensure file ownership and permissions are correct."

Does anyone know if there's a doc that tells how to do this?
In reply to Jonathan Dowell

Re: Backup Temp Dir error message

by Ken Task -
Picture of Particularly helpful Moodlers

Don't think there is any tool in Moodle that shows moodledata/temp ownerships/permissions other than errors when Moodle is attempting to work in that directory.   So there isn't anything you, as Moodle Admin *which is inside moodle code only* ... not true admin at the operating system level ... can do, me thinks!

You did say you'd pass that along to server admin.  Would think since you are hosted on Amazon, server admin would be aware and knowledgeable enough to fix IF the issue is ownerships/permissions.

'spirit of sharing', Ken