Thread (23 messages) flat view 23 messages, 4 authors, 2017-03-22

Re: fatal: Could not get current working directory: Permission denied | affected 2.10,2.11,2.12, but not 1.9.5 |

From: Zenobiusz Kunegunda <hidden>
Date: 2017-03-13 12:23:44

Tested on ZFS filesystem



    [test0@s0]:<~>$ mkdir '232222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222'
    [test0@s0]:<~>$ cd 232222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222/
    [test0@s0]:<~/232222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222>$ git status
    fatal: Unable to read current working directory: Permission denied

    [test0@s0]:<~/232222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222>$ git blahblahblah
    fatal: Unable to read current working directory: Permission denied


But when I create directory with same name (232...) as it's subdirectory everything works as expected inside that subdirectory.Od: "René Scharfe" &lt;l.s.r@web.de>
Do: "Zenobiusz Kunegunda" &lt;zenobiusz.kunegunda@interia.pl>; 
Wysłane: 22:18 Sobota 2017-03-11
Temat: Re: fatal: Could not get current working directory: Permission denied | affected 2.10,2.11,2.12, but not 1.9.5 |
quoted
Am 09.03.2017 um 12:01 schrieb Zenobiusz Kunegunda:
OK, I printed euids inside function calling getcwd(). Every single
EUID is the same and have expected value. The same as any other local
application run by this user. Permissions of every directory in the
path are OK.

/bin/pwd -P inside directory returned exact path and exited with exit
status 0.
Weird.

I tried to reproduce the behavior on FreeBSD 10.3, unsuccessfully.  I 
tried with Ruby 2.2 from the ports tree and Ruby 2.3 installed with 
rbenv, and with git 2.6.4 from the ports tree and a self-compiled 
version of the current master branch.

You could try to bisect the issue to find which commit to git caused the 
behavior change, but that will be a tedious process (compile and install 
an intermediate version, run bundle install up to the point of interest 
then hit Ctrl-C, clean up somehow, run "git bisect good" or "git bisect 
bad" in the git source tree depending on the outcome of bundle, repeat 
ca. twelve times more).

But I suspect the cause of the problem hides somewhere else.  Why would 
pwd(1) be able to call getcwd(3) just fine, while git gets an EPERM 
error for the same call?  I'm stumped.

René
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help