"operation not permitted" for a file that no longer exists

On one of my devices, on Android it matters, 2 couple of files won’t get syncronised due to something along the lines of:

sudo <....> .syncthing.my_file123.mp4: operation not permitted.

However, these files don’t exist on a device at all. I have no idea why. They do on other devices, as the normal files, without the .syncthing prefix - my_file123.mp4

The sync progress will always reach and get stuck at 97%.

How to resolve this?

Please make sure there are no "*/:<>?\| characters in the file names. Android doesn’t support those on its storage, so files with them in their names cannot sync onto it.

3 Likes

I renamed them on other devices priour to the question. How to resolve it now on the Android device?

It’s not that Syncthing doesn’t support it but a file with "*/:<>?\| can’t exist in the file-system to begin with. And all of my devices, but one, are Android and Linux. One device is on Windows.

The errors should go away after you’ve renamed the files. Are they still popping up on the Android side? Have you tried restarting Syncthing there?

Android blocks them on the user storage regardless of the underlying file system. They are hardcoded in the Android’s source code.

They do, for months

Can you try to reset delta indexes on the Android side and see what happens? This is a safe operation and there is an option to do that in the Syncthing app settings.

Otherwise, if the problem still persists, I would suggest to remove and re-add the folder inside Syncthing on Android. You don’t need to delete the actual files from the disk to do so.

1 Like

What’s that? the “rescan” button? If so, I’ve tried it numerious times.

But then I’d have to set it up with each device over again?

There is an option called “reset delta indexes” in the debugging section of the Android app settings.

I don’t think so. If you remove the folder on Android only, then pause and unpause remote devices to trigger an “Add Folder” pop-up, then you can add the folder and share it with remote devices at the same time. You don’t need to remove it from other devices, only from the affected Android device. You can also initially set the folder type to “Receive Only” just to be extra safe.

1 Like

None of the two has helped. What else? Delete the directory with all the files on the Android device and then re-create it?