"cannot empty backup temp dir" error

"cannot empty backup temp dir" error

por Albert Ramsbottom -
Número de respostas: 8

When creating a small course backup on Moodle 2.7.8 we get an error as seen below

The backup completes successfully but moodle complains that the application cannot delete the backup file.  Moodle suggests this is a permissions issue


However when I perform the same backup in IE, it works with no errors. So both FF and GC the backup procedure fails but in IE it works.

Windows server using IIS

How could this be so? Every time I run the back in IE and it works the folder has been deleted in the moodledata folder, but every time I run it in FF or GC the folder remains


Cheers

Could just be a blip I suppose, so I will continue to test in IE to see if I can get an error



(Edited by Howard Miller to make subject more sensible - original submission Monday, 13 July 2015, 1:36 PM)

Anexo Captureback.PNG
Media de puntuacións: -
En resposta a Albert Ramsbottom

Re: "cannot empty backup temp dir" error

por Howard Miller -
Imaxe de Core developers Imaxe de Documentation writers Imaxe de Particularly helpful Moodlers Imaxe de Peer reviewers Imaxe de Plugin developers

- Switch on Debugging
- Reproduce problem
- Check for warnings displayed and/or check your web server error log for same. 

En resposta a Howard Miller

Re: "cannot empty backup temp dir" error

por Albert Ramsbottom -

On a successful IE backup we are getting

[13-Jul-2015 13:42:16 Europe/London] PHP Warning:  rename(Moodledata/cache/cachestore_file/default_application/core_config/c67-cache/.55a3b2281a64a0.02539321.temp,\Moodledata/cache/cachestore_file/default_application/core_config/c67-cache/c67af9414d212ad617b4311a76dcddbe4b61d971.cache): Access is denied. (code: 5) in \cache\stores\file\lib.php on line 721

However there is no folder only a file in moodledata/temp/backup

When we have a failed backup using FF or GC we get the file and the folder

So it appears that IE is able to delete the folder but not the file whereas FF or GC are not able to delete either???


Cheers

En resposta a Albert Ramsbottom

Re: "cannot empty backup temp dir" error

por Albert Ramsbottom -

We are on a multi-node environment so i wonder if that has anything to do with it.  We replicate the moodledata folder rather than connect to webs to one instance of moodle data


Cheers

En resposta a Albert Ramsbottom

Re: "cannot empty backup temp dir" error

por Matt Seymour -

Hi Albert,

We have also been experiencing this problem for quite some time and also have a multi node Windows Network Load balanced environment, with Moodledata folders replicated.


The error does not consistently happen for every backup.


En resposta a Matt Seymour

Re: "cannot empty backup temp dir" error

por Matt Seymour -

Just to update this.

I did a little more playing and have found, what appears to work for us.

The TEMP directory inside the Moodledata folder requires a certain level of permissions so that files can be deleted. Windows requires that users have a FULL CONTROL ace, to be able to DELETE folders in a directory. According to documentation I have read (can't remember exactly what) it instructs you to give AUTHENTICATED USERS MODIFY permissions. This is not sufficient for the backup directory as the user needs to DELETE folders.

So to fix, give the AUTHENTICATED USERS, FULL CONTROL on the backup directory ONLY.

Hopefully that helps someone else

Media de puntuacións:Useful (1)
En resposta a Matt Seymour

Re: "cannot empty backup temp dir" error

por Albert Ramsbottom -

This does help but I am not sure what authenticated users means

Webserver user?

machine user?


Thanks for the info

En resposta a Albert Ramsbottom

Re: "cannot empty backup temp dir" error

por Matt Seymour -

Authenticated Users


Type in Authenticated users and give it permissions.

Authenticated Users isn't a true group—it's a special security principal that specifies any session that's been authenticated using some account, such as a local SAM account, domain account, or account from any trusted domain. So Authenticated Users does include the accounts you mention.

Hope that helps.

Matt

Media de puntuacións:Useful (1)
En resposta a Matt Seymour

Re: "cannot empty backup temp dir" error

por Matt Seymour -

HI Just to update you on this issue, we are still having it happen.  

Even with the correct permissions in place we are unable to delete these files. I am starting to wonder if it is related to the DFSr replication. Perhaps i will go back to one server temporarily and see if i get the error.