Please describe the problem.
Initially generated an annex while having a restrictive umask 077. Then cloned that repository to another host for public consumption so directory had proper/good permissions set allowing group to access. And everything is accessible but not the load which I 'annex get'ed. Key directories were readable but not the content. I guess there is somewhere 'preserve permissions' setting for rsync/scp which imho shouldn't be there and content should inherit local/environment settings
What version of git-annex are you using? On what operating system?
6.20160208+gitg1ac9034-1~ndall+1
I'm going to close this. Mostly because rsync is no longer used for ssh transfers and so file perms are not preserved, unless git-annex is talking to a very old git-annex-shell. Also because not enough information is known about the repo setup back then. done --Joey
umask 077 means a file will be mode 400. The 400 mode is indeed retained when that object is transferred to another repository.
git-annex does make sure that the file can be read by the current user. Which mode 400 does allow.
Did your problem involve some other user needing to read the file? If you configure core.sharedrepository group or world, then git-annex will adjust the mode of the received object to let the group or everyone read it.
The simplest way to make it use the umask would be this patch. But, with this patch, if I have a file that's mode 664 and my umask is 077, git annex add will change the file mode to 600. So, I don't like this patch; its impact is too broad.
The umask-based mode setting could be put into every remote that uses a transfer method that preserves permissions. (Including the external special remote I suppose, since it might do so.) Or put in
gitViaTmp
but there are a few placesgetViaTmp
is used that do not involve transfers from remotes.Also this would add the overhead of umask()+stat()+chmod()+umask() to every file downloaded by git-annex, on top of the chmodding it already does.