I've got an error with two previously working repositories on the extSdCard. The error reads "Folder Marker Missing".The paths haven't changed. The permissions to said paths haven't changed. Deleting and readding doesn't help. No settings have changed.
I am running v0.10.2 with the latest Play Store version. My phone is a Galaxy S5 running 4.4.2
Anyone else have the same issue?
I assume the error is shown in the GUI? Could you also post a logcat?
@calmh @AudriusButkevicius help with this? (source link just because)
Just create an empty .stfolder file in the folder root.
It should have been created for you when you upgraded though.
Maybe the error message should say that ;)
Upgraded version from last night cured the recreated repo, but the original still has the same issue.
Also the recreated repo now has the error "open /storage/extSdCard/foo/.stfolder: permission denied" despite the ignore permissions box being checked or unchecked. I just tried with both options. File versioning is disabled.
It seems syncthing has no read access on the path specified?
@Nutomic the problem that it should have not happened in the first place, as when you started the new version it should have created the .stfolder files in every repo.
@AudriusButkevicius Right, but I thought we had solved the extSdCard read/write issues? Maybe I'll try remaking it and reporting back.
Same issue. For whatever reason, its no longer reading/writing to the extSdCard.
Sorry I don't understand, you want syncthing to work without read/write access to the SD card?
How is it supposed to sync stuff if it can't read nor write?
There is something wrong with your permissions on the filesystem level.
No I want it to do that. It was working perfectly last week, but this weekends updates broke something. At least for me.
How can I find/create a logcat?
Nothing has changed permission wise as far as I am aware between this release and the last release.
Curious. So then maybe this is an android issue. But nothing has changed over there as well...
Do you have shell access to the device? Can you ls -la on the path of the repo/folder?
Output of ls -la
drwxrwx--- root sdcard_r 2014-10-07 15:13 DCIM
And which user is syncthing running on?
I guess you can see that in the ps tree.
Is the user part of sdcard_r group?
output of ps | grep syncthing
u0_a218 25278 265 477808 50768 ffffffff 00000000 S com.nutomic.syncthingandroid
u0_a218 26595 26590 797840 16556 ffffffff 00000000 S /data/data/com.nutomic.syncthingandroid/lib/libsyncthing.so
I'm not sure about the username scheme for android. I.E. i'm not sure u0_a218 will persist after a reboot. I'm also not rooted so idk if i can add the user to the group either.
@Nutomic any ideas?
Linux permissions are pretty pointless on Android. The app definitely has permissions to write to sd card.
Btw I'm having the same issue. Syncthing crashed when I first started it after updating.
crash log.
Curious. I'll stand by. But until then, I'll have to transfer stuff with a cable like a caveman :P
@wasutton3 You could try to downgrade (using F-Droid).
Curious, Same bug appears on 0.5.1
Finally in 0.5.5 the sync working in Internal Storage, buat when i try to add folder in my SDcard via Web GUI (because in add folder > directory, there is no option to choose sdcard, only show my internal storage) the app not working again with error (puller:final:chmod bla bla bla :operation not permitted)
FIXED: i don't know why but after i open syncthing from the notification and "waiting for api" the sync can write to my sdcard and there is no error showing again
@wasutton3 I guess you need to downgrade even more as 0.5.1 is the new puller. I think you need 0.4.x
@AudriusButkevicius Looks like with F-Droid, the earliest available is 0.5.1, does anyone have an earlier .apk?
@wasutton3 You might have to restartt your device because the v0.10.2 syncthing binary might still be running (you can check the syncthing version in app settings).
And 0.5.0 was the last version with old puller (syncthing v0.9.x). (you can enable the archive repo in F-Droid for older versions)
@Nutomic can you test if stat works on the android sd card? Perhaps even the Go's os.Stat?
This whole permissions denied thing looks really weird. It's only trying to stat the file on launch and is getting a permissions denied error.
Stat works fine on sd card, output is
File: .
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 12h/18d Inode: 3062915168 Links: 14
Access: (0771/drwxrwx--x) Uid: ( 0/ UNKNOWN) Gid: ( 1028/ UNKNOWN)
Access: 1970-11-04 22:52:11.000000000
Modify: 2014-10-20 23:18:09.000000000
Change: 2014-10-20 23:18:09.000000000
Not sure how to test stat in Go, but doesn't syncthing use that all the time? And is the error on any specific file? (didn't find it in the log)
Anyways, so I don't really see the bug.
It seems that the config migration failed for some reason (.stfolder did not get created), and now you are getting this error.
If you recreate .stfolder manually, this should go away.
Right, it does not seem to happen for new folders.
So I'll just add a workaround in the Android code.
Well it's there for a reason so no need to hack around a security feature. Not sure how Androids mounts work, but if its not possible for the content of the repo to disappear (content only, if the dir disappears we handle that), then I guess its safe.
Edit: brain faster than typing on phone keyboard
"but if its not possible for the content of the repo"
What's possible? :P
It is possible that the sdcard is removed, but in that case, an app wouldn't have permission to write to that directory anyway.
So I'll push the fix.
i should have missed something but i am in the latest version (0.5.7) on a S4 in 4.4.2 and still having this issue.
i've created the file manually through adb touch /storage/extSdCard/DCIM/.stfolder but i have a permission error.
it seems that syncthing have no write right on this folder.
can you clarify me the workaround please ?
thanks :)
Try sudo, or chmod'ing?
Not sure if that is available on Android though?
i've not rooted my device ... i cannot do sudo and chown is not permited with adb rights ... :-/
I think there are some hacks to let apps access external storage on KitKat, but you'll have to search for them yourself.
Fortunately, things seem to get better with Lollipop.
Since KitKat gives write access only in a special directory owned by the app, the only solution for a non-rooted phones is to place all data to be synced in that directory, e.g. /storage/sdcard1/Android/data/com.nutomic.syncthingandroid/files/
Unfortunately, it covers only a limited amount of all use-cases.
There is an xposed module for that: http://repo.xposed.info/module/de.defim.apk.handleexternalstorage I installed it but the issue remains.
Most helpful comment
Same issue. For whatever reason, its no longer reading/writing to the extSdCard.