# Syncthing does not have permission to write to sdcard on Lollipop

**URL:** https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390
**Category:** Android
**Created:** [April 9, 2015, 7:49pm UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390 "2015-04-09T19:49:41Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![AgentDrTran](https://forum.syncthing.net/user_avatar/forum.syncthing.net/agentdrtran/32/1160_2.png) [@AgentDrTran](https://forum.syncthing.net/u/AgentDrTran)
#### Post date: [April 9, 2015, 7:49pm UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/1 "2015-04-09T19:49:41Z")

</div>

I have an Xperia Z3c and would like to sync a directory on my desktop with one on my phone’s sd card. Syncthing is saying it does not have permission to write so sd.

---

<div class="post-metadata">

### Author: ![Zillode](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/z/c67d28/32.png) [@Zillode](https://forum.syncthing.net/u/Zillode)
#### Post date: [April 9, 2015, 9:47pm UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/2 "2015-04-09T21:47:45Z")

</div>

Create an issue on [https://github.com/syncthing/syncthing-android/](https://github.com/syncthing/syncthing-android/) and post a logcat

---

<div class="post-metadata">

### Author: ![josuah](https://forum.syncthing.net/user_avatar/forum.syncthing.net/josuah/32/850_2.png) [@josuah](https://forum.syncthing.net/u/josuah)
#### Post date: [April 9, 2015, 10:32pm UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/3 "2015-04-09T22:32:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![AgentDrTran](https://forum.syncthing.net/user_avatar/forum.syncthing.net/agentdrtran/32/1160_2.png) [@AgentDrTran](https://forum.syncthing.net/u/AgentDrTran)
#### Post date: [April 9, 2015, 10:48pm UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/4 "2015-04-09T22:48:36Z")

</div>

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](http://re-sync.It)’s also now throwing permission errors again.

---

<div class="post-metadata">

### Author: ![Rewt0r](https://forum.syncthing.net/user_avatar/forum.syncthing.net/rewt0r/32/2526_2.png) [@Rewt0r](https://forum.syncthing.net/u/Rewt0r)
#### Post date: [April 10, 2015, 9:52am UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/5 "2015-04-10T09:52:57Z")

</div>

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/`

---

<div class="post-metadata">

### Author: ![AgentDrTran](https://forum.syncthing.net/user_avatar/forum.syncthing.net/agentdrtran/32/1160_2.png) [@AgentDrTran](https://forum.syncthing.net/u/AgentDrTran)
#### Post date: [April 11, 2015, 4:25am UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/6 "2015-04-11T04:25:19Z")

</div>

I am rooted. Also, I thought Lollipop did support apps accessing the entire sd card? [http://gadgets.ndtv.com/mobiles/news/android-50-lollipop-brings-full-sd-card-access-for-third-party-apps-616420](http://gadgets.ndtv.com/mobiles/news/android-50-lollipop-brings-full-sd-card-access-for-third-party-apps-616420)

---

<div class="post-metadata">

### Author: ![Rewt0r](https://forum.syncthing.net/user_avatar/forum.syncthing.net/rewt0r/32/2526_2.png) [@Rewt0r](https://forum.syncthing.net/u/Rewt0r)
#### Post date: [April 11, 2015, 6:11pm UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/7 "2015-04-11T18:11:13Z")

</div>

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

> **[Richer access to secondary shared storage devices In KitKat we introduced AP...](https://plus.google.com/+JeffSharkey/posts/4kxjY9JFemL)**
>
> Richer access to secondary shared storage devices In KitKat we introduced APIs that let apps read/write file in app-specific directories on secondary s... - Jeff Sharkey - Google+

---

<div class="post-metadata">

### Author: ![AgentDrTran](https://forum.syncthing.net/user_avatar/forum.syncthing.net/agentdrtran/32/1160_2.png) [@AgentDrTran](https://forum.syncthing.net/u/AgentDrTran)
#### Post date: [April 11, 2015, 7:33pm UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/8 "2015-04-11T19:33:30Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![phhowe17](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/p/b487fb/32.png) [@phhowe17](https://forum.syncthing.net/u/phhowe17)
#### Post date: [April 12, 2015, 12:01am UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/9 "2015-04-12T00:01:04Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![NeroBurner](https://forum.syncthing.net/user_avatar/forum.syncthing.net/neroburner/32/1092_2.png) [@NeroBurner](https://forum.syncthing.net/u/NeroBurner)
#### Post date: [April 12, 2015, 1:19am UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/10 "2015-04-12T01:19:10Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![Denny](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/d/9de053/32.png) [@Denny](https://forum.syncthing.net/u/Denny)
#### Post date: [June 19, 2015, 9:13am UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/11 "2015-06-19T09:13:13Z")

</div>

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

---

<div class="post-metadata">

### Author: ![drdozer](https://forum.syncthing.net/user_avatar/forum.syncthing.net/drdozer/32/2060_2.png) [@drdozer](https://forum.syncthing.net/u/drdozer)
#### Post date: [October 20, 2015, 11:12am UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/12 "2015-10-20T11:12:19Z")

</div>

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%).

---

<div class="post-metadata">

### Author: ![CrazyDiamond](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/d26b3c/32.png) [@CrazyDiamond](https://forum.syncthing.net/u/CrazyDiamond)
#### Post date: [November 13, 2015, 3:26am UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/13 "2015-11-13T03:26:17Z")

</div>

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  
`/storage/emulated/0/Android/data/com.nutomic.syncthingandroid/files`  
(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.

---

<div class="post-metadata">

### Author: ![kisolre](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/k/aeb1de/32.png) [@kisolre](https://forum.syncthing.net/u/kisolre)
#### Post date: [November 13, 2015, 2:16pm UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/14 "2015-11-13T14:16:15Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![enzedrailmaps](https://forum.syncthing.net/user_avatar/forum.syncthing.net/enzedrailmaps/32/9936_2.png) [@enzedrailmaps](https://forum.syncthing.net/u/enzedrailmaps)
#### Post date: [April 14, 2021, 3:00am UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/15 "2021-04-14T03:00:44Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![enzedrailmaps](https://forum.syncthing.net/user_avatar/forum.syncthing.net/enzedrailmaps/32/9936_2.png) [@enzedrailmaps](https://forum.syncthing.net/u/enzedrailmaps)
#### Post date: [April 14, 2021, 8:05am UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/17 "2021-04-14T08:05:44Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![enzedrailmaps](https://forum.syncthing.net/user_avatar/forum.syncthing.net/enzedrailmaps/32/9936_2.png) [@enzedrailmaps](https://forum.syncthing.net/u/enzedrailmaps)
#### Post date: [April 14, 2021, 7:27pm UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/19 "2021-04-14T19:27:46Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [May 14, 2021, 8:12pm UTC](https://forum.syncthing.net/t/syncthing-does-not-have-permission-to-write-to-sdcard-on-lollipop/2390/21 "2021-05-14T20:12:18Z")

</div>

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