diff --git a/doc/bugs/test_fail_on_windows__58___permission_denied_/comment_1_9f46a99e5f570de2313a5521b58640b3._comment b/doc/bugs/test_fail_on_windows__58___permission_denied_/comment_1_9f46a99e5f570de2313a5521b58640b3._comment new file mode 100644 index 0000000000..7c9f574816 --- /dev/null +++ b/doc/bugs/test_fail_on_windows__58___permission_denied_/comment_1_9f46a99e5f570de2313a5521b58640b3._comment @@ -0,0 +1,78 @@ +[[!comment format=mdwn + username="jkniiv@b330fc3a602d36a37a67b2a2d99d4bed3bb653cb" + nickname="jkniiv" + avatar="http://cdn.libravatar.org/avatar/419f2eee8b0c37256488fabcc2737ff2" + subject="comment 1" + date="2021-08-31T20:47:24Z" + content=""" +At my end I ran the `readonly` test with the `--keep-failures` flags and found out the following: + +[[!format sh \"\"\" +jkniiv@AINESIS MINGW64 /c/annx +$ ./git-annex test -p \"Unit Tests v8 adjusted unlocked branch.readonly\" --keep-failures +Tests + Unit Tests v8 adjusted unlocked branch + readonly: Init Tests + init: OK (4.00s) + add: OK (5.78s) + +All 2 tests passed (9.77s) +** Preserving repo for failure analysis in .t\tmprepo1 +** Preserving repo for failure analysis in .t\tmprepo0 +FAIL (16.98s) + .\\Test\\Framework.hs:57: + drop vs readonly repo failed (transcript follows) + drop foo + failed + git-annex: .git\annex\objects\6cd\e82\SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77\SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77: DeleteFile \"\\\\?\\C:\\annx\\.t\\tmprepo1\\.git\\annex\\objects\\6cd\\e82\\SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77\\SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77\": permission denied (Käyttö estetty.) + drop: 1 failed + +1 out of 1 tests failed (26.78s) + (Failures above could be due to a bug in git-annex, or an incompatibility + with utilities, such as git, installed on this system.) + +jkniiv@AINESIS MINGW64 /c/annx +$ cd .t/tmprepo1 + +jkniiv@AINESIS MINGW64 /c/annx/.t/tmprepo1 (adjusted/master(unlocked)) +$ ls -ld .git/annex/objects/6cd/e82/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77 +drwxr-xr-x 1 jkniiv 197121 0 Aug 31 23:08 .git/annex/objects/6cd/e82/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77/ + +jkniiv@AINESIS MINGW64 /c/annx/.t/tmprepo1 (adjusted/master(unlocked)) +$ ls -ld .git/annex/objects/6cd/e82/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77 +-r--r--r-- 1 jkniiv 197121 20 Aug 31 23:08 .git/annex/objects/6cd/e82/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77 + +jkniiv@AINESIS MINGW64 /c/annx/.t/tmprepo1 (adjusted/master(unlocked)) +$ chmod -Rv +w .git/annex/objects +mode of '.git/annex/objects' retained as 0755 (rwxr-xr-x) +mode of '.git/annex/objects/6cd' retained as 0755 (rwxr-xr-x) +mode of '.git/annex/objects/6cd/e82' retained as 0755 (rwxr-xr-x) +mode of '.git/annex/objects/6cd/e82/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77' retained as 0755 (rwxr-xr-x) +mode of '.git/annex/objects/6cd/e82/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77' changed from 0444 (r--r--r--) to 0644 (rw-r--r--) + +jkniiv@AINESIS MINGW64 /c/annx/.t/tmprepo1 (adjusted/master(unlocked)) +$ ../../git-annex drop foo +drop foo ok +(recording state in git...) + +jkniiv@AINESIS MINGW64 /c/annx/.t/tmprepo1 (adjusted/master(unlocked)) +$ ls -ld ../tmprepo0/.git/annex/objects/6cd/e82/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77 +drwxr-xr-x 1 jkniiv 197121 0 Aug 31 23:15 ../tmprepo0/.git/annex/objects/6cd/e82/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77/ + +jkniiv@AINESIS MINGW64 /c/annx/.t/tmprepo1 (adjusted/master(unlocked)) +$ ls -ld ../tmprepo0/.git/annex/objects/6cd/e82/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77 +-r--r--r-- 1 jkniiv 197121 20 Aug 31 23:07 ../tmprepo0/.git/annex/objects/6cd/e82/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77/SHA256E-s20--e394a389d787383843decc5d3d99b6d184ffa5fddeec23b911f9ee7fc8b9ea77 + +\"\"\"]] + +So it looks like the readonly status of the annex object got copied between r1 (`tmprepo0`) and r2 +(`temprepo1`) at the point of `get` and that prevented the removal of the file during `drop`. + +(Btw. I found out that in Msys2/MinGW what is represented as the POSIX readonly mode bits seems +to be really represented by the readonly file attribute and not as readonly permissions/ACLs +on the file. At least that seems to be the default setting. Cygwin on the other hand defaults +to mapping mode bits to ACLs in a rather complex fashion. All of this are just some details +that lie behind what calling out to an external `chmod` binary entails on Windows both above +in my Git Bash session and in git-annex' unit test `test_readonly`.) + +"""]]