tmp:operation not permitted

I encountered the error syncing from Mac to Android. I have browsed the forum for posts describing the same error, but the problem was different from what I reckon, and solutions did not work for me. Most notably: 1,2,3

For a total of 368 items, 15 items fail consistently.

Please help me troubleshoot and feel free to ask for any other information required.

The first file listed will probably not work because it has a trailing space in its name (Icon ), which is not allowed on Android. The others have all kinds of special characters, which might cause some trouble there as well. Especially the colons (:) are not allowed.

1 Like

It is troublesome to pay attention to such things. I would not expect, as someone who always simply used cloud, that there would be so many issues with peer-to-peer file synchronisation. Clouds certainly don’t seem to run into this issue. What abstraction they typically implement prevents it?

In any case, is there a solution to prevent troublesome characters from causing problems for syncthing?

I’m thinking of software like a Linter, but especially useful for a syncthing user, like: GitHub - sneaky-foxes/obsidian-safe-filename-linter: Obsidian app plugin to lint filenames for invalid or troublesome characters.

Some possible future workarounds are being discussed in Sync reserved characters proposal · Issue #9539 · syncthing/syncthing · GitHub, but for now, there is no automatic solution to the problem.

If you want to be sure that files are compatible with Android, you basically need to stick to the FAT conventions (see https://averstak.tripod.com/fatdox/names.htm).

The most popular approach seems to be object storage which typically tends to be machine-readable rather than human-readable.

1 Like

In addition, the typical cloud service doesn’t store all files on the local device. They are downloaded / streamed on demand when needed, and somewhere in that process, I guess it’s detecting and somehow fixing invalid file names for the local system. However, no watching is done in this case, so in contrast to Syncthing, e.g. Dropbox doesn’t need to deal with knowing which renamed file corresponds to which original (cloud-stored) file. The cloud is always the single source of truth, thus any local name changes are irrelevant.

Think of those services more like downloading individual files, while Syncthing keeps whole (local) folders synchronized continuously.

You have a point, and although I like the idea, the truth is, I need something reliable to sync across my devices and can’t fix problems on the run in a moment.

For my PC > Mobile I’ll have to use a cloud service since this is downloading local files to my phone. I do see usecases for syncthing, but I tried to stop relying on cloud thanks to it. I can only blame myself.

Yes, Sync reserved characters proposal · Issue #9539 · syncthing/syncthing · GitHub documents a solution to this issue, and its related branch GitHub - rasa/syncthing at feature/9539-encoderfs allows users to save files with the FAT reserved characters "*:<>?| on Android.

But in my testing, I have always been able to create filenames with trailing periods and spaces (‘aperiod.’ and 'aspace ') on Android versions 9, 12, and 14, on both internal storage, and exFAT-formatted external storage.

What version of Android are you using? Is it on internal or external storage?

Note that Android version 9 allows me to create filenames with the DEL character (\x7f), but Android 12 and 14 does not.

The two do work for me on Android 14, also with Syncthing when pushed onto the Android device. I cannot test older Android versions right now. The first file on the screenshot does seem to be about the trailing space though, and the path indicates internal storage in this case…

The other listed files have the usual suspects in their names (?, :, |, etc.).

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