What causes ffs_tmp errors?

Get help for specific problems
Posts: 8
Joined: 22 Feb 2020

pulck

I'm trying to sync a folder from one external drive to another and I keep getting "Cannot move" errors on the destination drive ("ERROR_FILE_CORRUPT... [MoveFileEx]").

Any ideas what is causing this?

Both my external drives are exFat and I'm backing up files from both Ubuntu and Windows machines. Can that cause any issues?
Posts: 8
Joined: 22 Feb 2020

pulck

Just to follow up on this myself, in case anyone can throw any light on this....

I've realised that FreeFileSync is creating a temporary Recycle Bin on the destination drive where it wants to place ".ffs_tmp" files. It is then unable to copy files into this new directory, reporting the file as corrupted and unreadable, and the new Recycle Bin folder gets left on the destination drive.

In Synchronisation Settings under "Delete Files", I've tried enabling "Permanent" instead of "Recycle bin", but this does not make any difference. I've also tried running FFS as administrator - still no luck.

Is there a way of preventing FFS from creating this new folder? Or of allowing it access to the new folder it creates?
Posts: 936
Joined: 8 May 2006

therube

No clue, but if you set Exclude Filters of:
\RECYCLER\
\RECYCLED\
\$Recycle.Bin\
does that make any difference?
Posts: 8
Joined: 22 Feb 2020

pulck

Thanks. I've just tried that but it doesn't make any difference.

I want to love FreeFileSync. The interface is simple and it does everything I want it to. I just can't get it to operate without problems. Would really appreciate any other thoughts.
User avatar
Posts: 3555
Joined: 11 Jun 2019

xCSxXenon

Does the recycle bin icon look like a folder, or like the Windows recycle bin? Windows will create recycle bins in locations that support it. Is it 'recycle bin' or '$Recycle.Bin'? What is the exact error that pops up when it can't move a file?
Posts: 8
Joined: 22 Feb 2020

pulck

It just looks like a normal folder icon:

Image

It seems to be FFS that's creating this folder, not Windows. And inside that folder are many recursive folders with similar names, but no actual files. When I try to delete those folders at file explorer level, Windows doesn't allow me to. It actually says, "Could not find that item".

The popup error that occurs doing synchronisation is: "Cannot move file..." then a filename with "ffs_tmp" on the end. Also "ERROR_FILE_CORRUPT: The file or directory is corrupted and unreadable. [MoveFileEx]"

In the log I also get the following error: "Unable to move XXX.ffs_tmp to the recycle bin. COPYENGINE_E_PATH_NOT_FOUND_SRC [IFileOperation::PerformOperations]".

Would dearly love to solve this!
Posts: 936
Joined: 8 May 2006

therube

What are your Sync settings pertaining to Delete files: ?

If you have it set to Recycle bin, is there any change if you set it to Permanent or Versioning?
(Test with test data.)
Posts: 8
Joined: 22 Feb 2020

pulck

Thanks. I tried both "Recycle bin" and "Permanent" and got errors with both of these.

I've just tried "Versioning" for the first time, setting the output directory to a completely separate drive. That also threw up errors but for the first time it finished the actual synchronisation itself, which is great news.

I'm still left with this annoying recursive Recycle bin folder on the destination drive, but I discovered that Ubuntu WILL allow me to delete it. So I think I have a workaround - for the time being at least.

Thanks for your help. I'm not sure I really understand the "Versioning" option, though. Is there any functionality I'm missing out on by not choosing "Recycle bin"?
User avatar
Posts: 55
Joined: 15 Feb 2018

JDB

Try deleting the Recycling Bin on the DESTINATION DRIVE (not the source). Perhaps it will be called $RECYCLE.BIN. Then before running the next sync, make sure that you have /$RECYCLE.BIN/ in the exclude list. I've encountered a weird issue in the past when a file tried to overwrite a directory name, or a directory tried to overwrite a file name. For example, if you once had a directory named FOOBAR, and it got synced to the destination, but then you deleted that directory and created a file named FOOBAR in the same place, I think you would get an error trying to sync it. Likewise, a file named FOOBAR that was deleted and then became a directory on the source, wouldn't be able to sync until you resolved the conflict by first deleting the thing on the destination. (sorry if this doesn't make sense, it's the best I can describe it)
Posts: 8
Joined: 22 Feb 2020

pulck

Thanks, but there is no $RECYCLE.BIN folder on the destination drive (nor, incidentally, on the source drive) and I already have that filter in place on the exclude list (I think it's there by default).

The issue I'm encountering is that FFS is creating ITS OWN recycle bin folder on the destination drive and is then putting temporary files in it. Then it's unable to delete this new folder and is complaining about this. I may have got this wrong, but that's my understanding of what's happening.

I'm not sure why this is happening - maybe because I'm using exfat external drives... or because I'm copying files off both Ubuntu and Windows systems... or because certain files have problematic ownership or permissions flags set. In any case, the versioning thing seems to have resolved it for the time being. I cannot be sure why but maybe because I'm setting the "Move drive" to a different drive (neither source nor destination) which stops FFS using the destination drive for temporary files.
User avatar
Posts: 55
Joined: 15 Feb 2018

JDB

Which OS are you running FFS under? One or both? How are volumes from 2 OS's made available to the system running FFS? Is the drive shared between both systems? Do you physically switch the backup drive from one system to the other? If so, then permissions could be your issue, and unfortunately I am not much help there. I do know that if you are mounting from NFS or SMB, having Administrator rights on the client do not translate directly to Administrator rights on the host. You may have to look into the export or share options on the servers.

There are 3 options in FFS that weren't mentioned above: 1) Fail-Safe Copy and 2) Copy locked files, and 3) Copy DACL, SACL, Owner, Group. Find these under the Tools -> Options menu.

Fail-safe copy is what creates the ffs_tmp files. First it copies the source to <name>.ffs_tmp, then only after that copy is successful, it replaces <name> with the .ffs_tmp copy. If you have selected "Copy DACL, SACL, Owner, Group", then make sure that the rights being copied are compatibile with the PARENT directory or volume where you are backing up to.

I don't know if this is your problem specifically, but just suggesting that it's something you should look at. Try de-selecting "Copy DACL...", and double check the permissions in the destination directory before trying again.
Posts: 8
Joined: 22 Feb 2020

pulck

Thanks for your reply.

I'm physically connecting an external USB drive to 2 separate PCs, 1 running Windows and 1 running Ubuntu. I'm keeping the documents on those 2 PCs synced with the external drive using FFS. Then I'm also syncing that external drive with another external drive by connecting them both to my Windows machine and running FFS. The idea is that I always have 3 sets of my data (i.e. 2 backup drives). Maybe that is overkill but I have been stung in the past with a failed drive.

You might right about the permissions issue. I've started setting all document permissions to full access on the Ubuntu machine (chmod 777) to see if that stops the error cropping up again in future backups.

I've just checked my settings in FFS and I've been using Fail-safe copy all the time. But I think I'll see how it goes for a while with setting permissions on the Ubuntu machine before fiddling with those settings, that way I can rule out one thing at a time.
User avatar
Posts: 55
Joined: 15 Feb 2018

JDB

On Ubuntu, check to see if you have ACLs configured as well. I'm not familiar with administering Ubuntu, but I am aware that they have some form of ACL protection in addition to the traditional "rwxrwxrwx" permission mask. It's enabled by specifying an option in the /etc/fstab file or mount command, and may require that your filesystem is "ext4", so I guess you're not using ACLs. With or without ACLs, If you have checked off the FFS option "Copy DACL, SACL, Owner, Group", perhaps that's what is causing errors when writing to your exFAT disk. If Ubuntu has good NTFS support in your version, then perhaps migrating your exFAT backups to NTFS would provide better functionality... or maybe worse! I suggest thoroughly testing with a different hard drive first before migrating your backups, because from what I understand, NTFS support in Linux got off to a rocky start. Part of your testing should be running "chkdsk" in Windows on the backup drive after every Ubuntu backup, because the Ubuntu NTFS driver probably doesn't know about Windows' System Volume Information, and there's probably still no Ubuntu "fsck" tool for NTFS (nor exFAT for that matter).
Posts: 1
Joined: 15 Dec 2022

leavemealone

No clue, but if you set Exclude Filters of:
\RECYCLER\
\RECYCLED\
\$Recycle.Bin\
does that make any difference? therube, 06 Jul 2020, 17:42
I'm a linux user and i have a lot of errors with unreadable files or folders due to permissions or proprietary content. these are the folders i've compiled based on forum responses using this program. I've provided this data to be helpful.
Exclude:

*\.Trash-*\*
*\.recycle\*
*.tmp
*.pipe
*\RECYCLER\*
*\RECYCLED\*
*\$Recycle.Bin\*
*\.*\*
*\snap\*
*\SteamLibrary\steamapps\common\Proton 6.3\*
*\SteamLibrary\steamapps\shadercache\*
*\steamapps\compatdata\*
But also when I do backups / sync, i have recycle-bin turned off and have auto-retry set to on for default options. I'm usually only interested in the mirror or update function, based on what and where the operation is being done.