Syncthing does not have permission to write to sdcard on Lollipop

Create an issue on and post a logcat

I’m wondering if it could help to know what kind of Android Rom you’re running, custom or stock…

Stock Xperia ROM. It also just started working, but after deleting all files from the device and changing some on the master server, it won’t re-sync.It’s also now throwing permission errors again.

As of Lollipop, Android apps can only write to their app folder on the SD card (unless you’re rooted). So put your folders under /path/to/sd/Android/data/com.nutomic.syncthingandroid/

I am rooted. Also, I thought Lollipop did support apps accessing the entire sd card?

Sorry seems I was wrong - you are apparently supposed to be able to with Lollipop and what I said applies to KitKat.

I just used some other apps that use the SD card and they all require me to hit a button that enables writing to SD card, I believe the apps need to request the permission.

I’m unable to sync the camera files on the external SD card (/storage/extSDCard/DCIM/Camera) with the error error “open /storage/extSdCard/DCIM/Camera/.stfolder: permission denied”. I am running Android 4.4.2 on a Samsung tablet. This means I’m unable to sync any images from the camera. I’ve marked the sync folder as Master, so it should only need read access.

The write access is needed to kind of check if the folder is available. To check this the file .stfolder is created, if this fails then it is assumed, that the folder isn’t accessable.

Just an anwer out of my head, correct me if i’m wrong

Edit: without this, think about what happens if under some circumstances the sd card isn’t mounted. Then everything will be deleted, because clearly the folder to sync is empty!

Does anybody know if this issue has already been raised? If yes would you mind giving me the ticket number as I am very much interesting by the same.

I have 3 different Samsung devices under Lollipop/Kitkat and unfortunately I am not able to write on the external SD Card has it crashes or indicates an error message “permission denied” even if I select the /path/to/sd/Android/data/com.nutomic.syncthingandroid/ folder.

Thank you

I’m having the same issue. Stock android on a samsung s5. I store all my photos on my sd card, and want these synced live but syncthing says error (100%).

Noob here and really impressed with this software. I got it working between a Linux Desktop & Linux Laptop but have had the same issue as discussed here trying to get Android Lollipop working (problem with permissions on the DCIM directory, ‘external’ card) so I could upload photos automatically.

The solution (work around) for me was mentioned above in this post (thank you Rewt0r)
i.e. I set the phone’s camera app to save to
(note: the ‘files’ directory at the end already existed but was not mentioned in original post and I did not try this without it). Then I deleted my original ‘Pictures’ sync folder in the phones syncthing settings that I had set up earlier and created a new one with the same name ‘Pictures’ that referenced the ‘new’ …/files directory (there was a restart in there somewhere)

After that I took a picture, waited a few seconds and watched as it appeared in my Linux Desktop’s folder. EUREKA!

This was on a Sony xperia E2303 (or ‘m4 aqua’ I think - don’t buy one!)
Android Version: 5.0
Kernel Version: 3.10.49
Build Number: 26.1.A.2.167
Phone is NOT rooted

Syncthing v0.12.1 on Android
Syncthing v0.12.2 on Linux

I should add that I’m using ‘Open Camera (by Mark Harman)’ instead of Sony’s default camera app which may or may not let you change the default directory.

This is only a temporary solution as the xperia m has memory issues and saving photo or video to the internal card won’t help but fine for now.

Hope this helps someone else.

Another workaround that I use: create a “.stfolder” file in the folder that you want to sync on the extsdcard(if the default file manager can not create new files create it somewhere else and use the default file manager (which should be able to access all files) to copy it to that folder. And then when syncing use that folder in “master” mode (so no writes to it are required).

Sorry writing to these folders /storage/emulated/0/Android/data/com.nutomic.syncthingandroid/files is not a solution as not all other apps can access them.

Please try: /storage/emulated/0/Android/media/com.nutomic.syncthingandroid/ for example, Simple Gallery does index this folder quite well.

On my phone that is the path to the internal memory not the SD card, So there would still be no access with this to the SD card.

The same subfolder structure can be manually created on sd card as well.

As I pointed out quite clearly above, these folders are inaccessible to apps other than syncthing, making their existence on the SD card essentially irrelevant.

@enzedrailmaps …/media is accessible on my phone. …/data is accessible, but not indexed (.nomedia file)

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