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.

Description of the issue

Despite granting All Files Access picking a folder to sync in external USB storage produces 2 errors:

mkdir /storage/1234-5678: permission denied 
Error on folder "name" (abcde-12345): folder path missing

The part of the app responsible for creating .stfolder is successfully using the SAF-chosen & translated path and creating that folder & text file on the USB drive. But, another part of the app appears to be unable to use that path and the actual sync business fails.

From reading the docs it seems like there should exist somewhere a real file path to the USB drive that syncthing can use with All Files Access, but the SAF picker & translator does not apparently create that path? Maybe the Android 11 file picker gear can be updated to detect USB storage paths (‘portable’ storage in the documentation) as well as sdcards (‘reliable’ external storage)?

Reproduction Steps

Create a new folder sync, use SAF to choose a directory on a portable USB drive. Once folder sync setup is completed you will see the errors above in the webgui. Note that removable sdcards that are set up as reliable storage do not produce this error on my Samsung tablet, although I find I cannot write to the sdcard outside of the app’s directory. This also confuses me but that’s another topic.

Version Information

  • App Version:
  • Syncthing Version: v1.15.1
  • Android Version: Android 11
  • Device manufacturer: Samsung & Google
  • Device model: Galaxy Tab S6 tablet & Pixel 4a

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

locuturuscommented, May 10, 2022

I got it working:

You need to get the correct path, and enter it into the webgui.

If you use the file picker it will return, for example, “/storage/C90F-14E4/Pictures” but this will fail. It’s not the real path. You need to enter “/mnt/media_rw/C90F-14E4/Pictures” (using your own drive’s name and folder path instead of mine). The webgui complained of something but in the end it worked!

I suggest that the file picker be corrected to return /mnt/media_rw and/or update the custom file path tool (the gear) to detect removable storage in a more reliable way. In the meantime you can get the true path using Material Files, which by the way also supports opening folders in the main view.

locuturuscommented, Jun 10, 2021

I get that dialog as well, but inspecting the app’s granted permissions afterwards shows it is not actually granted. I even switched from F-Droid to Play Store to see if there was a difference and there wasn’t for me. Am thinking to check with ADB soon. The docs specifically say the root of USB storage should be available with raw paths but permission is denied to those paths and now it looks like the needed permission is not honored. Weird.

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 Ways to Fix USB Drive Error “Please insert disk into ...
Methods to recover multimedia files from USB drive showing insert disk error: · 1. Use different USB port · 2. Try heating up...
Read more >
You can fix the 'Please insert a disk into USB drive' error today!
Method 1. Change incompatible USB drive letter ... It is likely that this error can be corrected by replacing the drive letter. Basically,...
Read more >
【2022】9 Ways to Fix 'Please Insert a Disk into USB Drive'
Fix 1: Change the USB Port · Fix 2: Try heating up or Cooling the Drive Manually · Fix 3: Assign a New...
Read more >
Warning! Pen Drive Not Detected/Recognized, How to Fix? [4 ...
How to Fix a USB Flash Drive That Is Not Recognized · 1:14 Check your USB on disk management · 1:40 Fix 1....
Read more >
USB Device Not Recognized Error: Fixed [8 Possible Solutions]
Ways to Fix USB Device Not Recognized Error · #1) Restart Your Computer · #2) Update Computer · Tenorshare 4DDiG · #3) Change...
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