git on mounted CIFS is it Git or Cygwin

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

git on mounted CIFS is it Git or Cygwin

Jason Pyeron
I have an issue with git in Cygwin on windows shares - this is recent (worked months ago).

I have narrowed it down to a component of git creating a file as 04xx instead of 06xx permissions. When I do the same with mktemp, I am able to write the file, but git gets a permission denied. I can chmod +w the temp file and then writing works, albeit too late.

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: [hidden email]
.com: [hidden email]
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

Reply | Threaded
Open this post in threaded view
|

Re: git on mounted CIFS is it Git or Cygwin

L A Walsh
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
you thought
about why you'd want to use the cygwin version of git vs. the windows
version
since you are running 'git' on the windows machine?  I tend to like the
cygwin
version of things because often it will use the same sources and act the
same way
as a version on linux, so that's just a comfort and familiarity thing.  
Depending
on your use case, you might want to run git natively using a Win version.

    Now another question, you say you are running git in Cygwin.  Now
you say
you are running this on a "windows share".  What that implies is that
the files
are being stored on another machine on the network (not locally) that
might be
a windows machine exporting part of its file system as a 'share', or it
could be
another OS (like linux) running something like "Samba" to export the disks
with a Windows-type network interface (like CIFS).  Is there a 3rd machine
that is exporting its disks as windows-shares so they can be mounted by
windows
machines (or other OS's using the CIFS protocol) -- since that is what a
'share' is -- a view of part of a filesystem on that 3rd system.  ==OR== is
it a local (to the windows machine) disk or partition that most likely has
the disk formatted with NTFS.  

    CIFS is a network filesystem interface and has little or nothing to
do with
cygwin.  It can be used between other OS's (linux<->linux for example)
to share
files or windows<->windows or between different OS's.

    A guess on my part -- CIFS isn't party of this -- and you are
running git
storing files on a local hard disk running NTFS and cygwin is emulating
posix
permissions (ex. 0644) on NTFS.

    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
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).

Depending on where you create a directory it can affect
the permissions -- like /tmp is usually set to allow users
to create, modify and delete their own files, but not those
of other users.  Those permissions can change how the file
permissions are enforced -- like under tmp, you'd retain write
access despite what permissions were on the file, but under a
git dir owned by another user, permissions denying write
access would be more likely to be strictly enforced.

> I have narrowed it down to a component of git creating a file as 04xx instead of 06xx permissions. When I do the same with mktemp, I am able to write the file, but git gets a permission denied. I can chmod +w the temp file and then writing works, albeit too late.
>  
---
    So what umask is there when the file is created, and what
permissions does git try to create the file with?

    Possibly using 'strace' would allow you to see how or why
the file is created with the wrong permissions.

    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
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).

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: [hidden email]
> .com: [hidden email]
> 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

Reply | Threaded
Open this post in threaded view
|

RE: git on mounted CIFS is it Git or Cygwin

Jason Pyeron
> -----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: [hidden email]
> > .com: [hidden email]
> > 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

Reply | Threaded
Open this post in threaded view
|

Re: git on mounted CIFS is it Git or Cygwin

L A Walsh
On 2020/01/28 14:56, Jason Pyeron wrote:
....

Two short details,
ll is an alias commonly used on unix/linux/cygwin
most often standing for "ls -l" in its simplest form.
Mine does a few other things

alias llg='ls -l'         #long listing

alias ll='llg -gG'        # same with user+group turned off

lsacl is a shell script I use to get a more convenient and
compact form of acl's on linux; laster ported it to cygwin to do the same:


Here it is -- feel free to pass it along:
---
lsacl
---
>  cat ~/bin/lsacl
#!/bin/bash

## $Id: lsacl,v 1.5 2015-08-02 10:29:25-07 law Exp $
# Version 2 -- try to work with getfacl on cygwin
#


shopt -s expand_aliases
alias int=declare\ -i   sub=function  string=declare

gfacl=$(type -P getfacl)

#add cygwin function to return true/false
if ! type -f cygwin 2>/dev/null ; then
  _un_=$(type -P uname)
  if    [[ $_un_ ]] ; then _os_=$($_un_ -o);
  elif  [[ -e /proc/sys/kernel ]]; then _os_=Linux;
  else  _os_=Cygwin;
  fi
  if    [[ $_os_ =~ Cygwin ]]; then function cygwin () { return 0; }
  else  function cygwin () { return 1; }
  fi
  unset _un_ _os_
  export -f cygwin
fi

if cygwin 2>/dev/null ;then
  [[ $gfacl ]] || { printf "FATAL: Cannot find getfacl in path\n"; exit 1; }
  sub gfacl () { "$gfacl" "$@"; }
else                    ## linux version has broken semantics requiring "-p"
  sub gfacl () { "$gfacl" -p "$@" ; }
fi

export -f gfacl


sub facl2str {
  string fn=${1:?"Need pathname"}
  string s1='/^\#.*$/d; /^\s*$/d; s/\s*#.*$//;
s/^(.)(ser|roup|ask|ther):/\1:/; y/\n/,/'
  string facl=$(gfacl -a "$fn"|sed -r "$s1"|tr "\n" ",")
  facl=${facl%,}
  string dacl=$(gfacl -d "$fn"|sed -r "s/^default://; $s1"|tr "\n" ",")
  dacl=${dacl%,}
  printf "[%s/%s]\n" "$facl" "$dacl"
}



int acllen=0 maxfnln=0
#for fn in "$@" ; do if ((maxfnln<${#fn})); then maxfnln=${#fn}; fi ; done

sub acl_str () {
  if cygwin ;then
    perm=$(facl2str "$fn")
  else
    qfn=$(printf "%q " "$fn")
    out="$(chacl -l "$fn")"
    perm="${out#$qfn}"
  fi
  printf "%s\n" "$perm"
}


for fn in "$@"; do
  int max=40
  perm=$(acl_str "$fn")
  int len=${#perm}
  if ((len>_acl_len_)); then acllen=len; fi
  if ((acllen>max));    then acllen=max; fi
  printf "%-${acllen}s %s\n" "$perm" "$fn"
done


--
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

Reply | Threaded
Open this post in threaded view
|

RE: git on mounted CIFS is it Git or Cygwin

Jason Pyeron
In reply to this post by L A Walsh
I have added the ll and lsacl output.

Note the lsacl died on the mounted folder, but was fine on /tmp/

> -----Original Message-----
> From: Jason Pyeron <[hidden email]>
> Sent: Tuesday, January 28, 2020 5:57 PM
> To: '[hidden email]' <[hidden email]>
> Subject: RE: git on mounted CIFS is it Git or Cygwin
>
> > -----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]

$ cd REDACTED_CWD/objects/pack/

$ lsacl .
getfacl: .: Not supported

getfacl: .: Not supported

[/] .

$ lsacl /tmp/
[u::rwx,g::rwx,o::rwx/u::rwx,g::r-x,o::r-x] /tmp/



> > 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
>

$ ls -l -gG . | grep -v pack-
total 1183488
-r--r--r-- 1         12 Jan 28 17:27 tmp_pack_kxvLWs
-rw-r--r-- 1          0 Jan 28 17:28 tmp_test_mktemp_ZwIIZw
-rw-r--r-- 1          0 Jan 28 17:27 tmp_test_touch_sdfsdfsdf

> 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: [hidden email]
> > > .com: [hidden email]
> > > 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

Reply | Threaded
Open this post in threaded view
|

RE: git on mounted CIFS is it Git or Cygwin

Jason Pyeron
In reply to this post by Jason Pyeron
It was working again for a moment, I am perplexed as there were no Cygwin/git updates. There have been windows updates.

BLODA? Windows Defender?

-r--r--r-- 1 USER GROUP    1106509 Feb  5 17:50 pack-4d7f674008f52b936c8195a6d484d5e4d1a08e3c.pack
-r--r--r-- 1 USER GROUP         12 Feb  5 17:59 tmp_pack_qESkLc
drwxr-xr-x 1 USER GROUP          0 Feb  5 18:00 .
-r--r--r-- 1 USER GROUP         12 Feb  5 18:00 tmp_pack_5GRYNv

What is even more weird, is that it succeeded with a file mode of 0444/-r--r--r--

I have tried git for windows too, same issue. I think I should move this to the git mailing list.

-Jason

> -----Original Message-----
> From: Jason Pyeron <[hidden email]>
> Sent: Sunday, January 26, 2020 4:56 PM
> To: '[hidden email]' <[hidden email]>
> Subject: git on mounted CIFS is it Git or Cygwin
>
> I have an issue with git in Cygwin on windows shares - this is recent (worked months ago).
>
> I have narrowed it down to a component of git creating a file as 04xx instead of 06xx permissions.
> When I do the same with mktemp, I am able to write the file, but git gets a permission denied. I can
> chmod +w the temp file and then writing works, albeit too late.
>
> 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: [hidden email]
> .com: [hidden email]
> 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

Reply | Threaded
Open this post in threaded view
|

Re: git on mounted CIFS is it Git or Cygwin

Andrey Repin
In reply to this post by L A Walsh
Greetings, L A Walsh!

> Here it is -- feel free to pass it along:
> ---
> lsacl
> ---
>>  cat ~/bin/lsacl
> #!/bin/bash

> ## $Id: lsacl,v 1.5 2015-08-02 10:29:25-07 law Exp $
> # Version 2 -- try to work with getfacl on cygwin
> #


> shopt -s expand_aliases
> alias int=declare\ -i   sub=function  string=declare

Stopped reading st this line. And immediate "no" to anything containing this
level of trickery.


--
With best regards,
Andrey Repin
Friday, April 17, 2020 21:14:07

Sorry for my terrible english...

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple