Please describe the problem.
Trying to do a "git-annex reinit" on Android (sdcard) fails with an error about failing to set a permission. I tried "git-annex init" as well, and that gave the same error.
What steps will reproduce the problem?
$ git clone ssh://user@host/Westerley-Board.git
⋮
$ cd Westerley-Board/
$ git-annex reinit bc11f6b5-753c-4aeb-88e2-0c2f582e9901
reinit bc11f6b5-753c-4aeb-88e2-0c2f582e9901 warning: Cannot protect .git/config on this file system - do not store sensitive information here.
Detected a filesystem without fifo support.
Disabling ssh connection caching.
warning: Cannot protect .git/config on this file system - do not store sensitive information here.
Detected a crippled filesystem.
warning: Cannot protect .git/config on this file system - do not store sensitive information here.
(merging origin/git-annex into git-annex...)
(recording state in git...)
warning: Cannot protect .git/config on this file system - do not store sensitive information here.
warning: Cannot protect .git/config on this file system - do not store sensitive information here.
warning: Cannot protect .git/config on this file system - do not store sensitive information here.
(scanning for unlocked files...)
git-annex: .git/annex/keys.tmp/db: setFileMode: permission denied (Operation not permitted)
failed
git-annex: reinit: 1 failed
git-annex init
fails with the same error.
What version of git-annex are you using? On what operating system?
OS: Android, on a Amazon Fire Tablet 10. Installed in Termux via the new method (the script); edited the script to tell it to use armel on armv8l. (Supposedly a 64-bit chip, but the Android build is apparently 32-bit).
git-annex version: 7.20190504-g5638ae968
Please provide any additional information below.
Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
Yes! I have been using it on this tablet for a while, using the previous Android install steps. That was always a bit buggy, was hoping to upgrade to the new method. I also use git-annex on a bunch of Debian boxes, where it is wonderful. Have somewhere between ½ and ¾ TB data in git-annex, in enough repositories and copied to enough machines that I'd have to sit down and think about it to count them all.
I remeber that git message, it's trying to remove the world read bit from .git/config and the hack that is /sdcard does not support that.
On my phone (Android 8.1), neither git nor git-annex has the problem. /sdcard still doesn't really support unix file permissions, but chmod on it no longer fails, just silently leaves wrong permissions.
Given that there are plenty of places in git-annex that set file modes, I'd rather not complicate it by ignoring a failure to do so. It would not be a problem to fix this one specific case of it, which is in Database/Init.hs's callto setFileMode, but I don't know if fixing that won't just expose lots of other problems.
I worked around that one (I think I fully checked it out to Termux's $HOME, then moved it to sdcard. If I recall correctly, adjusted mode failed with more permission issues. But direct mode works... (I don't have the device in front of me, but it may be an actual SD card, not the fake sdcard. Which of course doesn't support permissions either.)
I wonder if it'd be easy enough to do a LD_PRELOAD hack to "fix" chmod.