Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

android 11 again: permission denied while receiving files on the phone

See original GitHub issue

Introduction: If you have issues with this fork, feel free to post them. I’ll look into them if a good reproducer or log is provided.

Description of the issue

I’m using the version linked here because of the reasons described in the other bug report: things are working good, syncthing keeps shoveling my pictures off the phone to the private storage. I shared another directory that should be kept in sync over many devices, data goes to and fro this time. but file will not roll in. directories are created though.


have a folder X on device B (any) share it with device A (Android 11, oneplus 8 in my case). put a new file in X on B. wait for it to show up on A A gets permission denied.

actual error message from the web gui on the phone: syncing: opening temp file: open /storage/emulated/0/Bunny Squad Common/Murmeltier/.syncthing.murmel_2020-12-24T04:59:06.mp3.tmp: operation not permitted Notice: the directory was created, the file was not. unix permissions seem to be in order: 660/770, root:everybody

GF’s oneplus 8, kept on android 10 does not show this problem.

Version Information

App Version:
Syncthing Version: v1.12.0-preview.3
Android Version: Android 11
Device manufacturer: Oneplus 
Device model: 8 (256gig)

Device platform info

adb shell "getprop | grep ro.product"
[ro.product.board]: [kona]
[ro.product.brand]: [OnePlus]
[]: [Thu Nov 19 01:17:19 CST 2020]
[]: [1605719839]
[]: [OnePlus/OnePlus8_EEA/OnePlus8:11/RP1A.201005.001/2011190109:user/release-keys]
[]: [RP1A.201005.001]
[]: [release-keys]
[]: [user]
[]: [2011190109]
[]: [11]
[]: [11]
[]: [30]
[ro.product.cpu.abi]: [arm64-v8a]
[ro.product.cpu.abilist]: [arm64-v8a,armeabi-v7a,armeabi]
[ro.product.cpu.abilist32]: [armeabi-v7a,armeabi]
[ro.product.cpu.abilist64]: [arm64-v8a]
[ro.product.device]: [OnePlus8]
[ro.product.first_api_level]: [29]
[ro.product.locale]: [en-US]
[ro.product.manufacturer]: [OnePlus]
[ro.product.model]: [IN2013]
[]: [OnePlus8_EEA]
[ro.product.odm.brand]: [OnePlus]
[ro.product.odm.device]: [OnePlus8]
[ro.product.odm.manufacturer]: [OnePlus]
[ro.product.odm.model]: [IN2013]
[]: [OnePlus8_EEA]
[ro.product.product.brand]: [OnePlus]
[ro.product.product.device]: [OnePlus8]
[ro.product.product.manufacturer]: [OnePlus]
[ro.product.product.model]: [IN2013]
[]: [OnePlus8_EEA]
[ro.product.property_source_order]: [odm,vendor,product,system_ext,system]
[ro.product.system.brand]: [OnePlus]
[ro.product.system.device]: [OnePlus8]
[ro.product.system.manufacturer]: [OnePlus]
[ro.product.system.model]: [IN2013]
[]: [OnePlus8_EEA]
[]: [qssi]
[ro.product.vendor.brand]: [OnePlus]
[ro.product.vendor.device]: [OnePlus8]
[ro.product.vendor.manufacturer]: [OnePlus]
[ro.product.vendor.model]: [IN2013]
[]: [OnePlus8_EEA]
[ro.product.vndk.version]: [30]

Android Log

adb logcat v
or MatLog (search on GitHub) output

this should be the relevant part:

12-28 13:30:06.580  8651  8651 W libsyncthingnat: type=1400 audit(0.0:132622): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c244,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c244,c257,c512,c768 tclass=netlink_route_socket permissive=0 b/155595000 app=com.github.catfriend1.syncthingandroid
12-28 13:30:06.911  2442  2442 E EventProcessor: onItemFinished: Error "opening temp file: open /storage/emulated/0/Bunny Squad Common/Murmeltier/.syncthing.murmel_2020-12-25T04:59:07.mp3.tmp: operation not permitted" reported on file: /storage/emulated/0/Bunny Squad Common/Murmeltier/murmel_2020-12-25T04:59:07.mp3
12-28 13:30:06.913  2442  2442 E EventProcessor: onItemFinished: Error "opening temp file: open /storage/emulated/0/Bunny Squad Common/Murmeltier/.syncthing.murmel_2020-12-26T04:59:06.mp3.tmp: operation not permitted" reported on file: /storage/emulated/0/Bunny Squad Common/Murmeltier/murmel_2020-12-26T04:59:06.mp3
12-28 13:30:06.916  2442  2442 E EventProcessor: onItemFinished: Error "opening temp file: open /storage/emulated/0/Bunny Squad Common/Murmeltier/.syncthing.murmel_2020-12-27T08:16:59.mp3.tmp: operation not permitted" reported on file: /storage/emulated/0/Bunny Squad Common/Murmeltier/murmel_2020-12-27T08:16:59.mp3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

Catfriend1commented, Aug 28, 2021

@oliver Don’t use special chars and feel safe 😃

qorroncommented, Dec 31, 2020

solution is found, problem is solved:

tl;dr android 11 apparently now uses a table to allocate files because it doesn’t like colons in filenames any more.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change app permissions on your Android phone - Google Help
On your phone, open the Settings app. · Tap Privacy And then Permission manager. · Tap a permission type. If you allowed or...
Read more >
Permissions updates in Android 11 - Android Developers
Starting in Android 11, if the user taps Deny for a specific permission more than once during your app's lifetime of installation on...
Read more >
Android 11 open failed: EACCES (Permission denied)
You can try to use the android:preserveLegacyExternalStorage="true" tag in the manifest file in the application tag.
Read more >
Android 11 cannot access Android/data folder | XDA Forums
Since the Android 11 update, I have been unable to access the Android/data folder through Samsung's "My Files" app.
Read more >
Creating Files in Android 11 gives Access Denied error.
public async void DownloadSupplierSample(object sender, EventArgs e) · { · try · { · string basepath; · if (Device.RuntimePlatform == Device.Android) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found