git on mounted CIFS is it Git or Cygwin
Jason Pyeron
jpyeron@pdinc.us
Tue Jan 28 22:56:00 GMT 2020
> -----Original Message-----
> From: L A Walsh
> Sent: Monday, January 27, 2020 7:01 AM
>
Sorry for the delay in the follow up test, it took me some time to get back to the system.
> On 2020/01/26 13:56, Jason Pyeron wrote:
> > I have an issue with git in Cygwin on windows shares - this is recent
> > (worked months ago).
> >
> Just to be clear, you are running 'git' on Cygwin and not on linux
> or some other OS? There is a 'git' that runs on window natively. Have
Yes - Cygwin packaged git, as the cygcheck output indicated below. And indeed the files are on a \\server\share with a corresponding fstab entry.
Cannot use other applications - not approved. I worked hard to get Cygwin approved on DoD computers.
<snip/>
> My first guess was something in git had changed, but in writing this
> out,
> I think it more likely that it has something to do with 1) your umask
> settings
> being set overly restrictively. Created a testdir w/no acls on it. By
> default
> it had acls on my system:
>
> > cd /tmp;
> > mkdir testdir
> > lsacl testdir
> [u::rwx,g::rwx,g:Untrusted:r-x,m::rwx,o::rwx/u::rwx,g::rwx,g:Untrusted:r-x,m::rwx,o::rwx]
> testdir
> # of note: my system created those acls by defaults setup on my system.
> # Simply creating a directory anywhere on my system will likely have some
> # ACL's applied by default
> # so for this test, I removed them:
> > chacl -B testdir
> > lsacl testdir
> [u::rwx,g::rwx,o::rwx] testdir
>
> # above acl corresponds to:
> > ll -da testdir
lsacl and ll tools are not available on my system. They do not appear to be for Cygwin at all https://cygwin.com/cgi-bin2/package-grep.cgi?grep=bin%2Fll.exe&arch=x86_64 and https://cygwin.com/cgi-bin2/package-grep.cgi?grep=bin%2Flsacl.exe&arch=x86_64
> drwxrwxrwx 2 36 Jan 27 03:34 testdir/
> (user, group and other all have full access) That was with a umask of 0.
> Then I created 3 files with my umask set to different settings:
> > umask 0; touch u0
> > umask 02; touch u02
> > umask 0377; touch u377
> #looking at permission settings:
> > ll testdir
> total 0
> -rw-rw-rw- 1 0 Jan 27 03:33 u0
> -rw-rw-r-- 1 0 Jan 27 03:33 u02
> -r-------- 1 0 Jan 27 03:34 u377
> # Note the last case, gave the user read-only access and nothing
> to group and other. So something that changed the umask could
> duplicate your symptoms.
>
> So a setting in 'git' might have changed to change the bits
> in the permissions or in the umask (aside from something changing your
> default umask value).
#bare repo
$ umask
0022
$ git fetch
remote: Counting objects: 410, done.
fatal: write error: Permission denied
fatal: index-pack failed
$ dir objects/pack/*tmp*
-r--r--r-- 1 XXXXXXXXXXXXXXXXUSER GROUPXXXXXXXXXXXXXXX 12 Jan 28 17:27 objects/pack/tmp_pack_kxvLWs
$ touch objects/pack/tmp_test_touch_sdfsdfsdf
$ mktemp -p objects/pack/ tmp_test_mktemp_XXXXXX
objects/pack/tmp_test_mktemp_ZwIIZw
$ dir objects/pack/*tmp*
-r--r--r-- 1 XXXXXXXXXXXXXXXXUSER GROUPXXXXXXXXXXXXXXX 12 Jan 28 17:27 objects/pack/tmp_pack_kxvLWs
-rw-r--r-- 1 XXXXXXXXXXXXXXXXUSER GROUPXXXXXXXXXXXXXXX 0 Jan 28 17:28 objects/pack/tmp_test_mktemp_ZwIIZw
-rw-r--r-- 1 XXXXXXXXXXXXXXXXUSER GROUPXXXXXXXXXXXXXXX 0 Jan 28 17:27 objects/pack/tmp_test_touch_sdfsdfsdf
> Possibly using 'strace' would allow you to see how or why
> the file is created with the wrong permissions.
I can strace /bin/echo - so it is possible to do that, but it is the pack sub command, I will have to ponder on how to strace the sub process.
>
> Also, if you really are working on a network disk -- how you mount
> and how the disk is exported can also set default permissions and
$ cat /etc/fstab | grep -v ^#
none /cygdrive cygdrive binary,posix=0,user 0 0
//host/share/ /mnt/XXXXXXXX/ ntfs binary,notexec,noacl,user 1 1
$ mount
//host/share on /mnt/XXXXXXXX type hgfs (binary,notexec,noacl,user)
C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin64 on / type ntfs (binary,auto)
B: on /cygdrive/b type hgfs (binary,posix=0,user,noumount,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
Z: on /cygdrive/z type hgfs (binary,posix=0,user,noumount,auto)
> umask effects. There can be ALOT of things that could be causing
> your problem, BUT, the simplest, and easiest to break w/o knowing
> it, would be something changing somethign like the umask or default
> permissions on the directory (i.e. the same symptom could be created
> by ACLs).
Touch and mktemp are not impacted, so why is git (pushing away from strace for now, trying logical discussion first)
>
> Hope this gives you some ideas on what to check -- if lucky
> it's an easy find, if not, well, could take alot more investigation.
>
> good luck!
> Linda
>
> > Renaming the file works in either case.
> >
> > What I need help in is determining if this is a bug or a special case of
> > mounting a windows share? Is this a Cygwin issue or a git issue?
> > Performing the fetch on the local file system has no issues.
> >
> > I have updated Cygwin as of a few hours ago, no changes in behavior. What
> > else can I provide to debug this better? Should this move over to the git
> > mailing list?
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ GIT_TRACE=true git fetch REDACTED_REMOTENAME
> > 13:31:59.678749 git.c:344 trace: built-in: git fetch
> > REDACTED_REMOTENAME
> > 13:32:03.393302 run-command.c:640 trace: run_command: unset GIT_DIR
> > GIT_PREFIX; ssh REDACTED_USER2NAME@REDACTED_HOST2NAME 'git-upload-pack
> > '\''REDACTED_REPO2PATH'\'''
> > 13:32:18.448798 run-command.c:640 trace: run_command: git
> > rev-list --objects --stdin --not --all --quiet
> > remote: Counting objects: 315, done.
> > 13:32:26.217550 run-command.c:640 trace: run_command: git
> > index-pack --stdin -v --fix-thin '--keep=fetch-pack 2039 on
> > REDACTED_HOSTNAME' --pack_header=2,315
> > 13:32:31.645732 git.c:344 trace: built-in: git
> > index-pack --stdin -v --fix-thin '--keep=fetch-pack 2039 on
> > REDACTED_HOSTNAME' --pack_header=2,315
> > fatal: write error: Permission denied
> > fatal: index-pack failed
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ mktemp -p REDACTED_CWD/objects/pack/ tmp_test_XXXXX
> > REDACTED_CWD/objects/pack/tmp_test_sdTdk
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ dir REDACTED_CWD/objects/pack/
> > ...
> > -r--r--r-- 1 REDACTED_USERNAME REDACTED_GROUPNAME 12 Jan 26 13:27
> > tmp_pack_dxknyW
> > -r--r--r-- 1 REDACTED_USERNAME REDACTED_GROUPNAME 12 Jan 26 12:52
> > tmp_pack_FPEnsr
> > -r--r--r-- 1 REDACTED_USERNAME REDACTED_GROUPNAME 12 Jan 26 13:32
> > tmp_pack_tpiIGW
> > -rw-r--r-- 1 REDACTED_USERNAME REDACTED_GROUPNAME 0 Jan 26 13:29
> > tmp_test_sdTdk
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ mv REDACTED_CWD/objects/pack/tmp_pack_tpiIGW
> > REDACTED_CWD/objects/pack/tmp_pack_tpiIGW.mv
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ mv REDACTED_CWD/objects/pack/tmp_pack_tpiIGW.mv
> > REDACTED_CWD/objects/pack/tmp_pack_tpiIGW
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ hexdump.exe -C REDACTED_CWD/objects/pack/tmp_pack_tpiIGW
> > 00000000 50 41 43 4b 00 00 00 02 00 00 01 3b |PACK.......;|
> > 0000000c
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ echo test >> REDACTED_CWD/objects/pack/tmp_pack_tpiIGW
> > -bash: REDACTED_CWD/objects/pack/tmp_pack_tpiIGW: Permission denied
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ chmod +w REDACTED_CWD/objects/pack/tmp_pack_tpiIGW
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ echo test >> REDACTED_CWD/objects/pack/tmp_pack_tpiIGW
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ GIT_TRACE_PACK_ACCESS=true GIT_TRACE_PACKET=true
> > GIT_TRACE_PERFORMANCE=true GIT_TRACE_SETUP=true GIT_TRACE=true git fetch
> > REDACTED_REMOTENAME
> > ...
> > 15:00:00.303534 pkt-line.c:80 packet: fetch> have
> > 1997703e1a01d311e54c32ece1776795209e61e1
> > 15:00:00.306043 pkt-line.c:80 packet: fetch> 0000
> > 15:00:00.312236 pkt-line.c:80 packet: fetch< NAK
> > 15:00:00.317800 pkt-line.c:80 packet: fetch> done
> > 15:00:00.550242 pkt-line.c:80 packet: fetch< NAK
> > 15:00:00.555607 pkt-line.c:80 packet: fetch< ACK
> > 3466429b2926acc6e9e2d3c4c1c9ef86d2c82860
> > 15:00:04.088156 pkt-line.c:80 packet: sideband< \2Counting
> > objects: 321, done.
> > remote: Counting objects: 321, done.
> > 15:00:04.791067 pkt-line.c:80 packet: sideband< PACK ...
> > 15:00:04.829401 run-command.c:643 trace: run_command: git
> > index-pack --stdin -v --fix-thin '--keep=fetch-pack 1706 on
> > REDACTED_HOSTNAME' --pack_header=2,321
> > 15:00:17.109869 trace.c:377 setup: git_dir: .
> > 15:00:17.112705 trace.c:378 setup: git_common_dir: .
> > 15:00:17.114454 trace.c:379 setup: worktree: (null)
> > 15:00:17.116820 trace.c:380 setup: cwd: REDACTED_CWD
> > 15:00:17.118969 trace.c:381 setup: prefix: (null)
> > 15:00:17.123794 git.c:419 trace: built-in: git
> > index-pack --stdin -v --fix-thin '--keep=fetch-pack 1706 on
> > REDACTED_HOSTNAME' --pack_header=2,321
> > 15:00:19.063715 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 22055
> > 15:00:19.147310 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 22214
> > 15:00:19.160865 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 22375
> > 15:00:19.264012 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 22578
> > 15:00:19.268455 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 23505
> > 15:00:19.318936 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 23706
> > 15:00:19.326812 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 24045
> > 15:00:19.335579 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 149489
> > 15:00:19.447526 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 182724
> > 15:00:19.452150 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 182883
> > 15:00:19.456088 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 183044
> > 15:00:19.571515 packfile.c:1592
> > ./objects/pack/pack-1ed0c0228d9db2201f0445b87af08494b0b29465.pack 183202
> > fatal: write error: Permission denied
> > 15:00:19.595784 trace.c:477 performance: 2.565797600 s: git
> > command: /usr/libexec/git-core/git index-pack --stdin -v --fix-thin
> > '--keep=fetch-pack 1706 on REDACTED_HOSTNAME' --pack_header=2,321
> > fatal: index-pack failed
> > 15:00:19.617599 trace.c:477 performance: 78.536082300 s: git
> > command: git fetch REDACTED_REMOTENAME
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ mount
> > REDACTED_SHARENAME/REDACTED_REPOPATH on /tmp/foo3 type hgfs
> > (binary,notexec,noacl,user)
> > REDACTED_SHARENAME/REDACTED_REPOPATH on /tmp/foo2 type hgfs
> > (binary,notexec,user)
> > REDACTED_SHARENAME/REDACTED_REPOPATH on /tmp/foo1 type hgfs
> > (binary,notexec,user)
> > REDACTED_SHARENAME on /mnt/REDACTED_SHAREMNT type hgfs
> > (binary,notexec,noacl,user)
> > C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
> > C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
> > C:/cygwin64 on / type ntfs (binary,auto)
> > C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME REDACTED_CWD
> > $ cygcheck.exe -s (paired down results)
> >
> > Cygwin Configuration Diagnostics
> > Current System Time: Sun Jan 26 20:14:43 2020
> >
> > Windows 10 Professional Ver 10.0 Build 17763
> >
> > ...
> > 3508k 2019/12/21 C:\cygwin64\bin\cygwin1.dll
> > Cygwin DLL version info:
> > DLL version: 3.1.2
> > DLL epoch: 19
> > DLL old termios: 5
> > DLL malloc env: 28
> > Cygwin conv: 181
> > API major: 0
> > API minor: 340
> > Shared data: 5
> > DLL identifier: cygwin1
> > Mount registry: 3
> > Cygwin registry name: Cygwin
> > Installations name: Installations
> > Cygdrive default prefix:
> > Build date:
> > Shared id: cygwin1S5
> >
> > ...
> > No Cygwin services found.
> >
> >
> > Cygwin Package Information
> > Package Version Status
> > _autorebase 001007-1 OK
> > base-cygwin 3.8-1 OK
> > base-files 4.3-2 OK
> > bash 4.4.12-3 OK
> > cygrunsrv 1.62-1 OK
> > cygutils 1.4.16-2 OK
> > cygwin 3.1.2-1 OK
> > git 2.21.0-1 OK
> >
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME /tmp/foo4
> > $ git clone REDACTED_CWD --bare ./
> > Cloning into bare repository '.'...
> > done.
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME /tmp/foo4
> > $ git remote add REDACTED_REMOTENAME
> > REDACTED_USER2NAME@REDACTED_HOST2NAME:REDACTED_REPO2PATH
> >
> > REDACTED_USERNAME@REDACTED_HOSTNAME /tmp/foo4
> > $ git fetch REDACTED_REMOTENAME autocommit-20191028-1148-from-master
> > remote: Counting objects: 33, done.
> > remote: Total 33 (delta 0), reused 2 (delta 0)
> > Unpacking objects: 100% (33/33), done.
> > From REDACTED_HOST2NAME:REDACTED_REPO2PATH
> > * branch autocommit-20191028-1148-from-master ->
> > FETCH_HEAD
> > * [new branch] autocommit-20191028-1148-from-master ->
> > REDACTED_REMOTENAME/autocommit-20191028-1148-from-master
> >
> >
> >
> > --
> > Jason Pyeron | Architect
> > PD Inc |
> > 10 w 24th St |
> > Baltimore, MD |
> >
> > .mil: jason.j.pyeron.ctr@mail.mil
> > .com: jpyeron@pdinc.us
> > tel : 202-741-9397
> >
> >
> >
> >
> > --
> > Problem reports: http://cygwin.com/problems.html
> > FAQ: http://cygwin.com/faq/
> > Documentation: http://cygwin.com/docs.html
> > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> >
> >
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list