Out of sync because of symlinks and permission denied

I’ve set up syncing of a couple different folders. In one of these folders I’ve at some point copied in a folder that contains symlinks to somewhere else on the drive. These obviously don’t make sense to sync, yet Syncthing tries its best and creates them on all my devices (being dead links of course). The problem is my Android device, which gives a permission error because it can’t create links to other parts of the directory structure (never mind that these would be dead links on this device as well). This causes it to be listed with “Out of Sync” on all my other devices which is quite annoying. Had a look in ignore patterns, but that only applies to filenames and can’t differentiate a link AFAICT. Is there a way to solve this? Obviously I could just delete the symlinks, but on some of my devices they actually work because of how my machines are set up very similarly and I’d like to keep them there.

There is no specific way to ignore just symlinks, no. The tools available to you are ignore patterns or ignoring the fact that the device looks out of sync.

Maybe a type pattern should also be added to the ignore patterns? I could imagine it would be interesting to be able to apply a pattern only to folders as well. So you could do something like (?t:directory)* for example would match all directories and (?t:links)* would match all links.

At the moment, I’d suggest using the solution from https://forum.syncthing.net/t/is-there-a-way-to-ignore-symlinks-on-android/18446. Basically, you use a script to automatically generate a list of symlinks and save it to a text file that is synced with the folder, then on Android simply use #include to add that to your ignore patterns.

Yeah after having read the ignore documentation fully I also landed at that as a possible solution. Synching wouldn’t happen to have a pre-sync hook now would it?

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