summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-12-19 10:47:29 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-12-19 10:47:29 -0400
commit5c2ec43e3415866af142e97576d4e3df4829d5d9 (patch)
tree1890002f2608f538dcb99854742fdbd38947b8cf
parent2f209cccff90ca470b01f4aee8f28964587bfae9 (diff)
parentdbb90a81604981c06e5c289622bac1f2d9573e65 (diff)
Merge branch 'master' of ssh://git-annex.branchable.com
-rw-r--r--doc/bugs/wrong_permissions_of_unused__44___badunused_and_tmpunused__63__.mdwn71
-rw-r--r--doc/bugs/wrong_permissions_of_unused__44___badunused_and_tmpunused__63__/comment_1_ca6b7e3d5d83d2dd6532533ecdb965c3._comment9
2 files changed, 80 insertions, 0 deletions
diff --git a/doc/bugs/wrong_permissions_of_unused__44___badunused_and_tmpunused__63__.mdwn b/doc/bugs/wrong_permissions_of_unused__44___badunused_and_tmpunused__63__.mdwn
new file mode 100644
index 000000000..393370de7
--- /dev/null
+++ b/doc/bugs/wrong_permissions_of_unused__44___badunused_and_tmpunused__63__.mdwn
@@ -0,0 +1,71 @@
+The files `unused`, `badunused` and `tmpunused` in `.git/annex/` do not have the correct permissions when the git repository is set to `--shared=group`. Such files are `600`, while they should be `660`, as other files in `.git/annex`.
+
+For this reason, when those files are created, they are accessibile only to one user (the owner), triggering errors when other users in the group attempt things like `git annex unused` or `git annex dropunused`. At least this occurs with git-annex 6.20171018+gitgbb20b1ed3-1~ndall+1 .
+
+To reproduce the problem:
+
+ git init --shared=group
+ git annex init
+ echo test > test
+ git annex add test
+ git commit -m test
+ git rm test
+ git commit -m removed
+ git annex unused
+
+you get:
+
+ unused . (checking for unused data...) (checking master...)
+ Some annexed data is no longer used by any files:
+ NUMBER KEY
+ 1 SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
+ (To see where data was previously used, try: git log --stat -S'KEY')
+
+ To remove unwanted data: git-annex dropunused NUMBER
+
+ ok
+
+
+Conversely, from another user of the group you get:
+
+ > git annex unused
+ unused . (checking for unused data...) (checking master...)
+ Some annexed data is no longer used by any files:
+ NUMBER KEY
+ 1 SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
+ (To see where data was previously used, try: git log --stat -S'KEY')
+
+ To remove unwanted data: git-annex dropunused NUMBER
+
+
+ git-annex: .git/annex/unused: openFile: permission denied (Permission denied)
+ failed
+ git-annex: unused: 1 failed
+
+Moreover:
+
+ > git annex dropunused 1
+ git-annex: .git/annex/misctmp/mergedrefs.0: createDirectory: permission denied (Permission denied)
+
+
+This is somewhat expected, because the permissions of `unused`, `badunused` and `tmpunused` are `600`:
+
+ > ll .git/annex/
+ total 40
+ drwxrwsr-x 5 ele testgroup 4096 dic 19 14:50 ./
+ drwxrwsr-x 9 ele testgroup 4096 dic 19 14:50 ../
+ -rw------- 1 ele testgroup 0 dic 19 14:50 badunused
+ -rw-rw-r-- 1 ele testgroup 345 dic 19 14:49 index
+ -rw-rw-r-- 1 ele testgroup 41 dic 19 14:49 index.lck
+ drwxrwsr-x 2 ele testgroup 4096 dic 19 14:49 journal/
+ -rw-rw---- 1 ele testgroup 0 dic 19 14:49 journal.lck
+ -rw-rw-r-- 1 ele testgroup 62 dic 19 14:49 mergedrefs
+ drwxrwsr-x 2 ele testgroup 4096 dic 19 14:49 misctmp/
+ drwxrwsr-x 3 ele testgroup 4096 dic 19 14:49 objects/
+ -rw-rw---- 1 ele testgroup 0 dic 19 14:49 precommit.lck
+ -rw-rw-r-- 1 ele testgroup 0 dic 19 14:49 sentinal
+ -rw-rw-r-- 1 ele testgroup 21 dic 19 14:49 sentinal.cache
+ -rw------- 1 ele testgroup 0 dic 19 14:50 tmpunused
+ -rw------- 1 ele testgroup 101 dic 19 14:50 unused
+
+If this is the intended behavior, could you please explain me how to use `git annex unused` and `dropunused` in a shared repository?
diff --git a/doc/bugs/wrong_permissions_of_unused__44___badunused_and_tmpunused__63__/comment_1_ca6b7e3d5d83d2dd6532533ecdb965c3._comment b/doc/bugs/wrong_permissions_of_unused__44___badunused_and_tmpunused__63__/comment_1_ca6b7e3d5d83d2dd6532533ecdb965c3._comment
new file mode 100644
index 000000000..c57394507
--- /dev/null
+++ b/doc/bugs/wrong_permissions_of_unused__44___badunused_and_tmpunused__63__/comment_1_ca6b7e3d5d83d2dd6532533ecdb965c3._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="emanuele"
+ nickname="emanuele.olivetti"
+ avatar="http://cdn.libravatar.org/avatar/f51cc5c6c3a0eb28faa6491c3cbcfcce"
+ subject="comment 1"
+ date="2017-12-19T14:19:14Z"
+ content="""
+Notice that, if I manually change the permsissions of `unused`, `badunused` and `tmpunused` to `660`, then other another user of the group can do `git annex unused` and `git annex dropunused 1` without errors. Unfortunately, after `git annex unused`, the ownership of `unused`, `badunused` and `tmpunused` changes from the initial user to the new user, and permissions are reset to `600`, which re-creates the initial problem.
+"""]]