Cannot write file attributes ERROR_NOT_SUPPORTED

Get help for specific problems
Posts: 5
Joined: 18 Apr 2023

OhFFS

I am trying to back up from NTFS to an exFAT volume via Samba, and I keep getting the above error:

Cannot write file attributes of "X:\Files\foo.exe"
ERROR_NOT_SUPPORTED: the request is not supported (SetFileInformationByHandle(FileBasicInfo))

This happens for quite a few files, not just .exe files.
When it happens with an .exe file, it reports it as an error.
When it happens with other file types, it reports it as a warning.

If I copy the files manually, it works with no problems.

Can anyone tell me what on earth is going on here?
Posts: 1038
Joined: 8 May 2006

therube

What OS are involved?

Might they be, the files have, ADS, Alternate Data Streams (that are not supported on exFAT)?
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

There might be a workaround. Unfortunately I cannot reproduce the error when accessing an exFAT-formatted USB stick that is shared by a different PC via network.
Posts: 5
Joined: 18 Apr 2023

OhFFS

What OS are involved?

Might they be, the files have, ADS, Alternate Data Streams (that are not supported on exFAT)? therube, 18 Apr 2023, 14:43
Windows 11 (22H2), backing up via Samba to a Linux box (Xubuntu 20.04) with an attached external drive. Have updated exfat-utils and exfat-fuse. The files in question have no extra streams, and I have no trouble copying them manually, as I said.
Posts: 5
Joined: 18 Apr 2023

OhFFS

There might be a workaround. Unfortunately I cannot reproduce the error when accessing an exFAT-formatted USB stick that is shared by a different PC via network. Zenju, 18 Apr 2023, 18:30
Open to suggestions. Currently the only workaround I can think of seems to be to ditch FFS and write a quick Perl script to do the backup instead...
Posts: 5
Joined: 27 Apr 2023

tbain98

I've had the same issue for several months. I'm using Windows 10 backing up to Samba exposed from my router (which I assume is running Linux). If memory serves, the Samba version is 1.0 because that's all the router supports.

I consistently see it fail while trying to sync files that were added on my computer, with an error that matches OP's, *except* that the files are all of the form `${FILENAME_WITHOUT_EXTENSION}~[4_ALPHANUMERIC_CHARS].ffs_temp`. It most often seems to happen with PDF files, though I can't say for sure that's not just a coincidence.

When I click `Ignore` for the files and attempt to manually copy them to the drive, Windows Explorer warns that the destination has files with the same names even though they aren't visible in the Windows Explorer UI and they aren't represented (size/count) in the properties viewer for the containing folder.

I'm tempted to blame the router and just move to a proper NAS, but also, it's hard to say that FreeFileSync isn't at least a partial cause of the problem, particularly since its file extension is clearly on the filename that's failing to copy.
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

Open to suggestions. Currently the only workaround I can think of seems to be to ditch FFS and write a quick Perl script to do the backup instead... OhFFS, 18 Apr 2023, 19:27
I've installed exfat-utils on Ubuntu 18 LTS, mounted an exFAT-formatted USB stick and shared it via Samba. FreeFileSync on Windows was able to copy files via network and set file modification times without error. So whatever the problem is in your case, it must be something specific to your setup.

I'm assuming that ERROR_NOT_SUPPORTED is a warning only, and that the files are still copied, but without the correct modification time.
Posts: 5
Joined: 18 Apr 2023

OhFFS

No, it's reported as an error, not a warning. It seems to happen when a new file is created, not when an existing file is updated. So for example I see things like this whenever I create a file:

16:47:51 Info: Creating file "B:\John\AppData\Roaming\Mozilla\Firefox\Profiles\c110gmj1.default-1552663754549\gmp-gmpopenh264\1.8.1.2\gmpopenh264.dll"
16:47:51 Error: Cannot write file attributes of "B:\John\AppData\Roaming\Mozilla\Firefox\Profiles\c110gmj1.default-1552663754549\gmp-gmpopenh264\1.8.1.2\gmpopenh264.dll".
ERROR_NOT_SUPPORTED: The request is not supported. [SetFileInformationByHandle(FileBasicInfo)]

but for an update, it succeeds:

16:47:51 Info: Updating file "B:\John\AppData\Roaming\Mozilla\Firefox\Profiles\c110gmj1.default-1552663754549\SiteSecurityServiceState.txt"
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

There must be something to this file "gmpopenh264.dll", because FreeFileSync is using a fallback copy routine and this is where the error occurs. Perhaps it's sparse, or it has a corrupted ADS stream.

Does the following test version work for this file? https://www.mediafire.com/file/z3g9bd9lzgjhkke/FreeFileSync_12.3_%255BBeta%255D_Windows_Setup%25283%2529.exe
Posts: 5
Joined: 18 Apr 2023

OhFFS

I'll try it, but bear in mind this was only one example. I have error message for several hundred files which failed in exactly the same way. And they are certainly not all corrupt, or many applications would not work. For example:

19:57:04 Error: Cannot write file attributes of "B:\John\AppData\Roaming\uTorrent\uTorrent.exe".
ERROR_NOT_SUPPORTED: The request is not supported. [SetFileInformationByHandle(FileBasicInfo)]

And yet uTorrent works perfectly well. Or a newly compiled program:

19:41:27 Error: Cannot write file attributes of "B:\John\Documents\new1.exe".
ERROR_NOT_SUPPORTED: The request is not supported. [SetFileInformationByHandle(FileBasicInfo)]
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

A corrupted ADS wouldn't have any impact on other applications that don't read ADS. But that was just an example. To find out what's up with these files, you would have to do a trace. But let's try the beta first.
Posts: 4
Joined: 26 Apr 2023

J700_be

FYI:
I'm, also having this issue copying files from NTFS (Windows 10 and 11) to FAT32 NAS or EXT2/3 NAS.
With admin rights using version 12.2.
The rights of the destination need to be applied to the copied files.
Posts: 14
Joined: 14 Jul 2023

Background_Basil_945

Hi all. I'm facing the same issue on 12.2 syncing MP3 music files from an NTFS NVMe drive to an NTFS NAS SSD. Is there any further update?

EDIT: found the issue for my situation at least. Access to my NAS (via SAMBA share on ASUS AX86S router) is restricted with username/password authentication , but I ensure access is available in windows explorer before running the sync. If I disable authentication (enable guest mode, so no username/password required) then the sync completes fine, so it appears to be an issue with network access authentication. In the meantime, I will disable password protection for syncing!
User avatar
Posts: 2451
Joined: 22 Aug 2012

Plerry

> ... I will disable password protection for syncing!
Not the safest idea.
Simply use the Windows Credential Manager to save the user/password for your NAS.
Posts: 14
Joined: 14 Jul 2023

Background_Basil_945

> ... I will disable password protection for syncing!
Not the safest idea.
Simply use the Windows Credential Manager to save the user/password for your NAS. Plerry, 14 Jul 2023, 17:40
Thanks - you're right, but the sync doesn't work if authentication is enabled. I only temporarily disable to sync. Hopefully to be fixed in a future update :)
User avatar
Posts: 2451
Joined: 22 Aug 2012

Plerry

> Hopefully to be fixed in a future update :)
Update of what?
This does not seem to be a FFS problem, nor a Credential Manager problem, as that combination works perfectly fine with Samba-shares, at least Samba/SMB-shares on other Windows machines and on Synology- and QNAP-NASses.
Your description suggests (if I understood correctly) that your "NAS" is actually your ASUS AX86S router, and your (Network Attached) Storage, likely the router's internal memory, or a stick or disk USB connected to your router.
Most likely, the problem is then in the routers firmware.
Perhaps you should search the ASUS forum.
Posts: 14
Joined: 14 Jul 2023

Background_Basil_945

Thanks Plerry, but it appears to be an issue with FFS.

I can copy and paste in windows explorer when authentication is enabled, but FFS generates the above error.
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

To find out what's up with these files, you would have to do a trace. Zenju, 06 May 2023, 07:19
Posts: 14
Joined: 14 Jul 2023

Background_Basil_945

Thanks Zenju, trace run and sent to you.
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

Thanks Zenju, trace run and sent to you. Background_Basil_945, 22 Jul 2023, 09:51
Now we're getting somewhere! This is a variant of viewtopic.php?t=7898 but without the remnant .ffs_tmp files - instead the server returns ERROR_FILE_NOT_FOUND.

1. For clarification, can you post the *full* error message for one of these failed copies, e.g. the one for "01 - The Number of the Beast.mp3".

2. Can you check if .ffs_tmp files are left behind on the server, after the error occured?

Update 2023-07-05: Your logs contain lots of entries like
Deleting file "\\[...]\03 - Wolves-8d77.ffs_tmp
so this is only a minor variant of the case in the other thread, in that the server returns an incorrect (cached) ERROR_FILE_NOT_FOUND, although the file is existing.
Posts: 14
Joined: 14 Jul 2023

Background_Basil_945

Thanks Zenju.

1.Full error message:
Cannot write file attributes of "\\AX86\Music (at MX500)\Big Wreck\FLAC\Albatross\01 - Head Together~4ed6.ffs_tmp".

ERROR_NOT_SUPPORTED: The request is not supported. [SetFileInformationByHandle(FileBasicInfo)]

2. I can't see any .ffs_tmp files, and hidden files are shown!
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

1.Full error message:
Cannot write file attributes of "\\AX86\Music (at MX500)\Big Wreck\FLAC\Albatross\01 - Head Together~4ed6.ffs_tmp".

ERROR_NOT_SUPPORTED: The request is not supported. [SetFileInformationByHandle(FileBasicInfo)] Background_Basil_945, 22 Jul 2023, 10:37
This is puzzling: I'm not seeing this type of error in the log at all. But perhaps we're dealing with two different issues here.

1. About the error message I mentioned earlier ("01 - The Number of the Beast.mp3"): You can retrieve it from:
C:\Users\JRC\AppData\Roaming\FreeFileSync\Logs\Network - D Music to AX86 2023-07-22 103219.259 [Stopped].html

2. About the ERROR_NOT_SUPPORTED error: Can you send me a .pml log for when this error occured? I don't think this error happened in the log you sent me.
Posts: 14
Joined: 14 Jul 2023

Background_Basil_945

Thanks Zenju - both sent!
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

For reference, here's the full error message related to the issue discussed in viewtopic.php?t=7898
Cannot copy file
"[...]\01 - The Number of the Beast.mp3" to
"\\[...]\01 - The Number of the Beast~f943.ffs_tmp".
ERROR_FILE_EXISTS: The file exists. [CopyFileEx]
Cannot read file attributes of "\\[...]\01 - The Number of the Beast~f943.ffs_tmp".
ERROR_FILE_NOT_FOUND: The system cannot find the file specified. [CreateFile]
I think the ERROR_NOT_SUPPORTED is a subsequent error that only occurs if the above ERROR_FILE_NOT_FOUND does not happen. In other words, when the workaround from viewtopic.php?t=7898 works as expected. But we'll see when we get there:

ERROR_FILE_EXISTS and ERROR_FILE_NOT_FOUND at the same time, is a new variant to me, and apparently also a server bug. I believe we can apply the same workaround: https://www.mediafire.com/file/xax5zdvzkxnadjm/FreeFileSync_12.6_%255BBeta%255D_Windows_Setup.exe
Posts: 14
Joined: 14 Jul 2023

Background_Basil_945

Thanks Zenju. Tried the beta but the same issue occurs.

Cannot write file attributes of "\\AX86\Music (at MX500)\Big Wreck\FLAC\Albatross\01 - Head Together-7aed.ffs_tmp".

ERROR_NOT_SUPPORTED: The request is not supported. [SetFileInformationByHandle(FileBasicInfo)]
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

This is the second error I mentioned, and is expected. But I don't know how it's possible that setting file attributes could fail with ERROR_NOT_SUPPORTED. Can you send me a PML log file for this case, too?
Posts: 5
Joined: 27 Apr 2023

tbain98

I've been able to reproduce this problem, and have run with both the normal FFS version (auto-updated yesterday) and with the beta linked by Zenju. For me, the beta failed with two sets of errors.

In some cases, no .ffs_tmp files were left behind, and the errors were like the following:

```
Cannot write file attributes of "B:\Main\Documents\Tim\Games\Aquamarine\DIVER LOGS\MAP02\DiversLog_Map02-41d0.ffs_tmp".
ERROR_NOT_SUPPORTED: The request is not supported. [SetFileInformationByHandle(FileBasicInfo)]
```

For other files, .ffs_tmp files were left behind, and the errors were like the following:

```
11:55:13 PM Error Cannot copy file
"D:\Documents - Shared\Tim\Games\Aquamarine\DIVER LOGS\MAP03\DiversLog_Map03_Letter.pdf" to
"B:\Main\Documents\Tim\Games\Aquamarine\DIVER LOGS\MAP03\DiversLog_Map03_Letter-495e.ffs_tmp".
ERROR_FILE_NOT_FOUND: The system cannot find the file specified. [GetShortPathName]
```

The first case seemed to happen only to a few files per run (sometimes none, sometimes up to three that I saw) out of the nine files I was synchronizing, and I only ever saw it happen to the ones that were first in the list. And when I started trying to reproduce it to capture it with Process Monitor, I stopped seeing the first case, so I'm not sure what to make of that, but the trace I just sent you was from when only the second case occurred for all nine files since that's all I managed to capture.

This behavior matches what I saw with the non-beta version, so there doesn't seem to be a difference with the beta vs with the official release.
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

For me, the beta failed with two sets of errors. tbain98, 23 Jul 2023, 06:26
Thanks, tbain98, for the log and also your helpful descriptions!

In some cases, no .ffs_tmp files were left behind, and the errors were like the following:

```
Cannot write file attributes of "B:\Main\Documents\Tim\Games\Aquamarine\DIVER LOGS\MAP02\DiversLog_Map02-41d0.ffs_tmp".
ERROR_NOT_SUPPORTED: The request is not supported. [SetFileInformationByHandle(FileBasicInfo)]
``` tbain98, 23 Jul 2023, 06:26
This seems to be the same problem as discussed with Background_Basil_945 above: an error in the fallback copy routine. I have a few ideas, how to work around the ERROR_NOT_SUPPORTED, although, it's essentially a server bug. But when FFS is in a position to help, the tool will do so, no matter who's responsible.

For other files, .ffs_tmp files were left behind, and the errors were like the following:

```
11:55:13 PM Error Cannot copy file
"D:\Documents - Shared\Tim\Games\Aquamarine\DIVER LOGS\MAP03\DiversLog_Map03_Letter.pdf" to
"B:\Main\Documents\Tim\Games\Aquamarine\DIVER LOGS\MAP03\DiversLog_Map03_Letter-495e.ffs_tmp".
ERROR_FILE_NOT_FOUND: The system cannot find the file specified. [GetShortPathName]
``` tbain98, 23 Jul 2023, 06:26
This error is nasty. The pattern is:
CreateFile    \\[...]\DiversLog_Map04_Letter-c5df.ffs_tmp    EAS NOT SUPPORTED
Windows copy routine detects EA (https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_file_ea_information) on the source pdf file, and tries to create a file on the network drive with EA, which the network share does not support. Hoever, this leaves behind a 0-sized file, that is not cleaned up. I'd estimate this is a network driver bug. (Theory: When requested for a file with EA support, the network driver first creates a 0-sized file, then tries to set EA, which fails. It reports the failure, but does not delete the remnant file.)
CreateFile    \\[...]\DiversLog_Map04_Letter-c5df.ffs_tmp    NAME COLLISION
The Windows copy routine sees the failure, and instead requests the network share to create a regular file without EA support. This fails with "ERROR_FILE_EXISTS", because of the remnant 0-sized file!
CreateFile    \\[...]\DiversLog_Map04_Letter-c5df.ffs_tmp    NAME NOT FOUND
Control is back to FreeFileSync: It received ERROR_FILE_EXISTS, so it want's to check it's file size. The server responds with *false* information: ERROR_FILE_NOT_FOUND. Likely a stale server cache, which is also a server bug, because the network driver knows of the previous ERROR_FILE_EXISTS)
FreeFileSync reasons: First there was ERROR_FILE_EXISTS, but now we have ERROR_FILE_NOT_FOUND, this looks like the SMB server bug. So let's try our own fallback copy routine, instead of Microsoft's CopyFileEx:
CreateFile    \\[...]\DiversLog_Map04_Letter-c5df.ffs_tmp    NAME COLLISION
The server once again changes its mind and finds the file existing again: ERROR_FILE_EXISTS
FreeFileSync also handles an unrelated problem with 8.3 file names. Since the server responded with ERROR_FILE_EXISTS, FFS tries to get the short name (GetShortPathName):
CreateFile    \\[...]\DiversLog_Map04_Letter-c5df.ffs_tmp    NAME NOT FOUND
The server once more changes its mind (again wrong information, as you already confirmed the remnant ffs_tmp files): ERROR_FILE_NOT_FOUND

-----------------------------------------------------------------
To sum up: If asked "does this file exist", the server responds with wrong (stale) information and denies it.
If asked to then go ahead and create the file, the server can't lie anymore and has to concede the file exists (creating a file necessarily needs to bypass caches).
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

@tbain98: There are a few things we could try to work around this mess.

First, let's try FILE_FLAG_NO_BUFFERING, in order to (maybe?) get the server to return correct answers when asked if a file exists: https://www.mediafire.com/file/jc2duvu0x6s8sfz/FreeFileSync_12.6_%255BBeta%255D_Windows_Setup%25282%2529.exe
Posts: 5
Joined: 27 Apr 2023

tbain98

Using that beta version, I still see the second case ("ERROR_FILE_NOT_FOUND" and the .ffs_tmp files were left behind) for all files, so no obvious change in behavior from that.

Full error log from one of the files:
10:18:05 PM    Error    Cannot copy file
        "D:\Documents - Shared\Tim\Games\Aquamarine\DIVER LOGS\MAP02\DiversLog_Map02.png" to
        "B:\Main\Documents\Tim\Games\Aquamarine\DIVER LOGS\MAP02\DiversLog_Map02-a377.ffs_tmp".
        ERROR_FILE_NOT_FOUND: The system cannot find the file specified. [GetShortPathName]
A new Process Monitor capture is in your inbox.