Syncthing on Windows 11 folder marker missing when creating a folder in one of legacy folders

As in this lengthy title I put (just for others reference), Syncthing shows:

Error
 on folder [folder name] (folder id): folder marker missing (this 
indicates potential data loss, search docs/forum to get information 
about how to proceed)`

Failed
 to create folder marker: mkdir \\?\C:\Users\user\Documents\[name of 2FA
 program here]\.stfolder: The system cannot find the file specified.

So making .stfolder (mkdir) on Windows 11 is impossible under all Windows libraries (lack of permissions?). This includes Documents, Videos, Music, Pictures, Videos, Downloads etc. I also tried to create folder on second non-system D drive which was connected to Music library (D:\Music) and it failed with the same message. Does this only happen to me? Also, when creating under any other folder like D:\Test for example, issue doesn’t occur and that’s my workaround for now. Sorry for this long post, but this made me really mad as I struggled for hours.

Update: Issue occurs only on legacy folders. On Windows 11 “My Documents” is called “Documents” instead. There is also a library “Documents”, but it’s a link to multiple folders within it. So I was wrong to mention libraries. Legacy folders are stored locally on Windows drives and are not virtual.

It’s probably because libraries are not actual physical folders:

Libraries are virtual containers for users’ content. A library can contain files and folders stored on the local computer or in a remote storage location. In Windows Explorer, users interact with libraries in ways similar to how they would interact with other folders. Libraries are built upon the legacy known folders (such as My Documents, My Pictures, and My Music) that users are familiar with, and these known folders are automatically included in the default libraries and set as the default save location.

Source: https://learn.microsoft.com/windows/client-management/client-tools/windows-libraries

Ok so I see that on that page it says:

Libraries are built upon the legacy known folders (such as My Documents, My Pictures, and My Music) that users are familiar with.

So I was wrong to mention libraries as libraries contian multiple folders. Issue actually occurs on folders. On Windows 11 “My Documents” is simply called “Documents” and you can change its location to any real folder on a drive. It was by default under C:\Users\user\Documents for me, but you can also put it like D:\Documents and issue would occur again. Libraries are like collection of multiple folders. Either way, this shouldn’t happen as legacy folders do exist and are not virtual.

How do you start Syncthing? It sounds as if the program simply isn’t allowed to access those folders.

I tried right click “Run as Administrator”, but I get same issue. Issue is very obvious as you say, Syncthing doesn’t have permission to access these folders in order to make hidden .stfolder in them, but I don’t know how to add permissions to it.

This isn’t a common problem though, as normally Syncthing should be able to access the same paths the user which has launched it can. Could you copy and paste the whole command line output which you get when you start Syncthing? You can obfuscate personal information in it, but please leave the rest untouched.

I’m not sure about that, there’s a lot of stuff, what part would you need? I even tried adding location as D:\Music\ .stfolder, but obviously that failed as well. If I make .stfolder in D:\Music it shows folder as “Out of sync” rather than “Stopped”.

[U2FLG] 2023/12/26 19:28:57 INFO: "Music" (folder code): Failed to sync 186 items
[U2FLG] 2023/12/26 19:28:57 INFO: Folder "Music" (folder code) isn't making sync progress - retrying in 1m1s.
[U2FLG] 2023/12/26 19:29:05 INFO: Adding folder "Test" (folder code)
[U2FLG] 2023/12/26 19:29:05 INFO: No stored folder metadata for "folder code"; recalculating
[U2FLG] 2023/12/26 19:29:05 INFO: Ready to synchronize "Test" (folder code) (sendreceive)
[U2FLG] 2023/12/26 19:29:05 INFO: Completed initial scan of sendreceive folder "Test" (folder code)
[U2FLG] 2023/12/26 19:32:37 INFO: Adding folder "Music" (folder code)
[U2FLG] 2023/12/26 19:32:37 INFO: No stored folder metadata for "folder code"; recalculating
[U2FLG] 2023/12/26 19:32:37 WARNING: Failed to create folder marker: mkdir \\?\D:\Music\Music (folder code)\.stfolder: The system cannot find the file specified.
[U2FLG] 2023/12/26 19:32:37 INFO: Ready to synchronize "Music" (folder code) (sendreceive)
[U2FLG] 2023/12/26 19:32:37 INFO: Failed initial scan of sendreceive folder "Music" (folder code)
[U2FLG] 2023/12/26 19:32:37 WARNING: Error on folder "Music" (folder code): folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)

Here is output after I get error for creating shared folder linked to D:\Music:

[start] 2023/12/26 20:55:17 INFO: syncthing v1.27.1 "Gold Grasshopper" (go1.21.5 windows-amd64) builder@github.syncthing.net 2023-12-11 06:44:04 UTC
[U2FLG] 2023/12/26 20:55:18 INFO: My ID: [ID]
[U2FLG] 2023/12/26 20:55:18 INFO: Single thread SHA256 performance is 1854 MB/s using minio/sha256-simd (1848 MB/s using crypto/sha256).
[U2FLG] 2023/12/26 20:55:19 INFO: Hashing performance is 1102.41 MB/s
[U2FLG] 2023/12/26 20:55:19 INFO: Overall send rate is unlimited, receive rate is unlimited
[U2FLG] 2023/12/26 20:55:19 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[U2FLG] 2023/12/26 20:55:19 INFO: Using discovery mechanism: global discovery server https://discovery.syncthing.net/v2/?noannounce&id=[ID]
[U2FLG] 2023/12/26 20:55:19 INFO: Using discovery mechanism: global discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=[ID]
[U2FLG] 2023/12/26 20:55:19 INFO: Using discovery mechanism: global discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=[ID]
[U2FLG] 2023/12/26 20:55:19 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027
[U2FLG] 2023/12/26 20:55:19 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [address]:21027
[U2FLG] 2023/12/26 20:55:19 INFO: GUI and API listening on 127.0.0.1:8384
[U2FLG] 2023/12/26 20:55:19 INFO: Access the GUI via the following URL: https://127.0.0.1:8384/
[U2FLG] 2023/12/26 20:55:19 INFO: My name is "desktop"
[U2FLG] 2023/12/26 20:55:19 INFO: Device [ID of device] is "(Android device name for regular Syncthing)" at [dynamic]
[U2FLG] 2023/12/26 20:55:19 INFO: Device [ID of device] is "(Android device name for Syncthing fork)" at [dynamic]
[U2FLG] 2023/12/26 20:55:19 INFO: Ready to synchronize "Music (in sync with Android)" (folder code) (sendreceive)
[U2FLG] 2023/12/26 20:55:19 INFO: Ready to synchronize "Aegis Android 2FA Backup" (folder code) (receiveonly)
[U2FLG] 2023/12/26 20:55:19 INFO: Ready to synchronize "War Thunder Highlights" (folder code) (sendonly)
[U2FLG] 2023/12/26 20:55:19 INFO: Completed initial scan of sendonly folder "War Thunder Highlights" (folder code)
[U2FLG] 2023/12/26 20:55:19 INFO: Completed initial scan of receiveonly folder "Aegis Android 2FA Backup" (folder code)
[U2FLG] 2023/12/26 20:55:19 INFO: QUIC listener ([::]:22000) starting
[U2FLG] 2023/12/26 20:55:19 INFO: TCP listener ([::]:22000) starting
[U2FLG] 2023/12/26 20:55:19 INFO: Completed initial scan of sendreceive folder "Music (in sync with Android)" (fcxou-bdpuj)
[U2FLG] 2023/12/26 20:55:22 INFO: UPnP parse: [link to .xml file] Malformed device description: no compatible service descriptions found.
[U2FLG] 2023/12/26 20:55:30 INFO: New NAT port mapping: external TCP address [address] to local address [::]:22000.
[U2FLG] 2023/12/26 20:55:30 INFO: Detected 1 NAT service
[U2FLG] 2023/12/26 20:55:38 INFO: quic://0.0.0.0:22000 detected NAT type: Port restricted NAT
[U2FLG] 2023/12/26 20:55:38 INFO: quic://0.0.0.0:22000 resolved external address quic://[address] (via stun.syncthing.net:3478)
[U2FLG] 2023/12/26 20:56:09 INFO: Established secure connection to IBT64XN at [address]
[U2FLG] 2023/12/26 20:56:09 INFO: Device IBT64XN client is "syncthing v1.27.2-preview.1" named "Pocophone F1" at [address]
[U2FLG] 2023/12/26 20:56:09 INFO: Connected to device [ID of device] with a newer version (current "v1.27.1" < remote "v1.27.2-preview.1"). Checking for upgrades.
[U2FLG] 2023/12/26 20:56:09 INFO: Failed to exchange Hello messages with [ID of device] at [IP adresses]/relay-client/TLS1.3-TLS_AES_128_GCM_SHA256/[something]: EOF
[U2FLG] 2023/12/26 20:56:09 INFO: Joined relay relay://[ip address]
[U2FLG] 2023/12/26 20:56:15 INFO: Established secure connection to IBT64XN at [ip adresses]/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256/LAN-P10-...
[U2FLG] 2023/12/26 20:56:15 INFO: Additional connection (+1) for device IBT64XN at [ip]/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256/LAN-P10-...
[U2FLG] 2023/12/26 20:56:15 INFO: Connected to device [ID of device] with a newer version (current "v1.27.1" < remote "v1.27.2-preview.1"). Checking for upgrades.
[U2FLG] 2023/12/26 20:56:15 INFO: Lost primary connection to IBT64XN at [ip]/quic-client/TLS1.3-TLS_AES_128_GCM_SHA256/...: replacing connection (1 remain)
[U2FLG] 2023/12/26 20:56:25 INFO: Adding folder "Music" (folder code)
[U2FLG] 2023/12/26 20:56:25 INFO: No stored folder metadata for "folder code"; recalculating
[U2FLG] 2023/12/26 20:56:25 WARNING: Failed to create folder marker: mkdir \\?\D:\Music\.stfolder: The system cannot find the file specified.
[U2FLG] 2023/12/26 20:56:25 INFO: Ready to synchronize "Music" (folder code) (sendreceive)
[U2FLG] 2023/12/26 20:56:25 INFO: Failed initial scan of sendreceive folder "Music" (folder code)
[U2FLG] 2023/12/26 20:56:25 WARNING: Error on folder "Music" (folder code): folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)

Can you look at the post above please? I’d really like to solve this issue. If I should send this to devs or somewhere else let me know. Thank you in advance.

No idea what could cause the problem, unfortunately. What if you try to create a completely different folder, e.g. D:\test-folder? Does it also fail with the same error messages?

Is D: an actual local disk or some kind of network mount?

1 Like

tengo el mismo problema. lograron solucionarlo??

Somehow I accidentally managed to delete my lengthy post. It’s astonishing how easily it can be deleted. In order to fix this “folder marker missing” problem, just go to Windows Security → Virus & threat protection → Manage settings → Controlled folder access. Here add syncthing.exe to whitelist as Windows Security blocks it from creating a .stfolder. That will allow you to make folders in any of Windows legacy ones (Documents, Music, Downloads etc.). Check this setting also for other programs because it works like a Windows Firewall and can block programs from doing even non-malicious regular tasks.

image

Solution is in post above :smiley:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.