Permission denied with 1.19.0


I have Syncthing running on LineageOS 18.1 (i.e. Android 11). Up to and including Syncthing 1.18.3 everything was working as expected.

After the update to 1.19.0 I okayed the initial hint that the DB had to be rebuilt. I don’t recall seeing any error there.

After that for every folder that was configured to be synced on my Android device Syncthing simply reported “Permission denied”.

I also noticed that the configuration could not be exported anymore. Syncthing claimed to have written the files to /storage/emulated/0/backups/syncthing, but nothing was there.

Allowing Syncthing to run as root solved the first problem (folders where synced again) but not the second (still no config backups possible). And I don’t want Syncthing to run as root when it shouldn’t be required.

I also tried a fresh install of but there too immediately a permission denied was shown for the default folder (default location for camera pictures, I guess?).

Rolling back to 1.18.3 solved both problems for me.

Android permissions (access to storage etc.) are all given to Syncthing.

The folders to be synced are nothing special, but just some folders on the actual SD card (e.g. /storage/<ID>/Documents) or the simulated one (e.g. /storage/emulated/0/DCIM).

The SD card is formatted as portable storage.

The device is rooted.

The only thing that I’d otherwise consider non-standard on the device is that I disabled the use of FUSE as described here :

setprop persist.sys.fflag.override.settings_fuse false

Because accessing files was terribly slow without that.

The logs didn’t show anything obvious, except that the permission was denied.

I didn’t find anything that seemed related on Github/issues or in the forums.

Any hints how to debug/solve this problem are greatly appreciated!

Thanks and regards – Till

I think this may indeed be the culprit. Can you set it to true, at least temporarily, and then test Syncthing again?

1 Like

Thanks for your quick reply. Your guess was spot on.

I set the property back to true, upgraded to and neither problem could be observed.

Unfortunately using FUSE renders other apps unusable so that’s not a permanent solution for my use case either.

Is there anything else I can try?

Or can this generally be addressed by Syncthing?

Or do I just have to wait and hope that Android 12 has less issues with file system performance?

Thanks and regards – Till

I doubt you can do anything about this other than just continuing to run Syncthing as root which circumvents all the Android limitations.

I’m not sure what the problem with the non-working backup is about though, as I’ve got no devices with newer Android to test it.

So no chance to fix/work around this in Syncthing?

That doesn’t bother me as much as the sync itself not working, but if you want to address that I’d be happy to provide debug information in case it helps.

I don’t think we can address this.

Each android app has it’s own user account in the kernel.

The files are owned by that account. There is some fuse magic that allows apps to access files they technically should not have access to (belonging to other apps).

The moment you switch off fuse, all of that goes away, so there is nothing we, as an application can do to change that.

You can run Syncthing as root allmighty, which then tramps anything to do with permissions in general.

I doubt any new version of android will change that.

They are moving towards “direct file access is evil”, not away from it, so I expect this to get worse, rather than better.

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