New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support OneDrive folders on recent Windows 10 #4542
Comments
Adding to the conversation... Note that accessing the OneDrive folder from Linux distributions utilizing the ntfs-3g driver to read/write to NTFS filesystems will also experience similar issues. This is because ntfs-3g is not currently able to understand folders/files with reparse points. It would be unlikely that Syncthing would be able to get around it without removing the reparse point. (microsoft/WSL#1941 (comment)) If people are syncing their OneDrive folder on Linux using the Windows partition copy, a quick workaround would be to use a script to execute the deletion of the reparse point on restart/shutdown on the Windows side. Deletion of the reparse point doesn't effect anything, as far as I can tell... But perhaps the story is different when you enable OneDrive's new "Files on Demand" feature. |
I think this is a conceptual problem, not a Syncthing problem. It's true that the reparse point is the direct cause of the failure, as that isn't presented in a way we expect in either the Go runtime or the lower level Windows APIs (I don't know which). But I expect that the point of the reparse point is for Windows to present OneDrive as some sort of virtual filesystem, with the files being on disk or in the cloud and being downloaded automatically as necessary. As such I fully expect things to be completely broken even if we understood the reparse point, as the files are probably not even on disk, necessarily. So all in all I think this is just something that will remain an incompatibility. But someone more on the Windows side of things is welcome to prove me wrong and fix it. |
It is possible to disable the "Files on Demand" feature in OneDrive settings. Therefore from user perspective this is bug/unsupported feature. In my case all the files and folder are locally on windows hard drive, but Syncthing still can't sync those. I ditched Syncthing and went back to manual Unison sync. Unison can sync the files without any problem so I do not understand what would prevent Syncthing from doing so. |
Not sure why this was marked as closed, since the issue still persists. I understand that Syncthing may need to be limited to files ON the device, ie not only in the cloud, but if a folder is fully synced then this should "just work". Not fixing this severely limits the appeal of syncthing. |
OneDrive should work if you disable the files on demand feature, and point the folder at the root of one drive and not Documents or something like that where OneDrive is a subfolder. There is usually never a good reason pointing two syncing applications to the same path, so I am not sure I am buying the appeal argument. |
Sorry - saying to not use the other (more useful app) is not a solution. Like I said: syncthing now has TWO fundamental bugs/issues:
|
It has more issues than that, yet I fail to understand your point. |
I know Syncthing has more issues than that. I agree. For people to close their eyes and say that an issue doesn't exist is not a solution, so this BUG should not be marked as closed. |
It's not a use case we are targeting, same way we don't sync directory mtimes, or ownership, or ACLs, or xattrs or resource forks/streams or symlinks on windows. We have to pick our battles, and this is not one of them. |
My understanding was that this issue was fixed. Is it not? In what way is it not?
|
He's talking about files inside the OneDrive folder. If I recall correctly, with the cloud business enabled, they don't look like normal files, even though they are downloaded on the local machine. I had to revert the fall creators upgrade, so I can't verify now. |
Right, so that’s the same as #1845 (deduplicated files on ntfs then). Which in that case indeed makes this issue non-solved; and likely non-solvable if windows insists on presenting these files as symlinks.
|
In my setup (Post Fall Creators Update), the files look like normal files, but the containing OneDrive folder looks like a symlink (at least in Golang). I don't actually think it's actually a symlink though... Since even Windows tools don't report it as being a link to another location. (It's marked as a reparse point, which isn't the same thing as a symlink.) |
The upstream issue on #1845 is solved, yet we've had no feedback if it's fixed in our case or not. |
Well, in Syncthing v0.14.41, I still exhibit the same "folder path missing" error message on my machine. (I still see very similar log messages as described initially in this issue and in the forums. ) Once I remove the reparse point metadata on the OneDrive folder, Syncthing functions normally again. Perhaps a check for reparse points in addition to symlinks is needed? If you need me to test something on my system, let me know. Keep in mind that I don't really know Golang (but I'm learning), so simple checks is probably all I can manage for now. (File listing and symlink check from forums) |
It all seems to end up being an issue with handling of NTFS reparse points, which provide (among other things) symbolic links, volume mount points, directory junctions, and single instance storage (the official MS name for deduplicated files). They are also used to provide the Windows-native equivalent of FUSE (more specifically, they act as an indirection to another filesystem translation driver which reads the associated data in the reparse point and then decides what to return), which in turn is how OneDrive works as of Windows 10 build 1709. More generic info on reparse points can be found in the wikipedia page. I can't give much advice on handling though, except to comment that it's a serious pain in the arse. |
The folder path being a "symlink" should be fine from our point of view; if it's something other magic that is a reparse point yet not a symlink that could be the issue. It would be neat if someone with the appropriate Windows could confirm one way or the other. Likewise on #1845. I was going to propose (configurably, maybe) disabling the symlink check on Windows as today it mostly would not be a security issue to do so (only admins and devs can create them). But if it doesn't solve these issues it's pointless. |
I can't confirm because I don't use OneDrive myself, but I'm fairly certain that the reparse point that is the root of a OneDrive directory is not a symlink, but instead an indirection to a filesystem translation filter that provides the sync integration with OneDrive. If it were a symlink, that would imply that it ultimately works in a manner similar to Dropbox or Syncthing, which is inconsistent with everything else I've heard about OneDrive low-level operation. |
It used to be the case that reparse points were represented as symlinks in Go, I am not sure what's the current state. |
@Ferroin - Is there any quick way to check this? To differentiate a reparse points from a Symlink-type or any of the other types of reparse points? I'm currently using OneDrive and Syncthing... but Syncthing reports the aforementioned error. I can attempt to test things if you let me know how. When I use fsutils, I get the following when querying the OneDrive folder:
@AudriusButkevicius - I think Go still reports the reparse points as a symlink... when it may not actually be truly a symlink. I still get the same results as what I listed in this gist. |
I'm fairly certain that that's not a symlink based on what you've posted. A symlink will give output similar to this:
So you'll have a |
id did reply on 1845. it did not work in case of dedup filesystem. |
Just wanting to document the exact settings that helped me to get Syncthing to sync a OneDrive root folder successfully with v0.14.41:
Afternoon these steps Syncthing v0.14.41 synced OneDrive root folder without any issues. |
Hmm, that actually kind of makes sense that things would work without the on-demand files feature enabled. Without that feature on, OneDrive should work pretty similarly to Syncthing or Dropbox, and thus shouldn't have cause any issues for Syncthing. |
Syncthing (v0.14.40) does not work with Onedrive on Windows 10 Fall Creator Update (version 1709) properly in some cases.
In Win 10 Fall Creators Update, Microsoft changed how Onedrive operates NTFS filesystem. Now OneDrive creates reparsepoints (an NTFS feature). Syncthing forum user "geeksquad" explained it here. It seems Syncthing is refusing to recognize a OneDrive directory using reparsepoints and reports an error message "folder path missing".
I have 2 OneDrive synced directories on a same computer synced with Syncthing to a Linux server. Based on my experiments the following factors may impact on the success of getting Syncthing to sync a OneDrive folder:
Version Information
Syncthing Version: v0.14.40 Win 64-bit
OS Version: Windows 10 Fall Creator Update (Version >= 1709 )
The text was updated successfully, but these errors were encountered: