From: Zenobiusz Kunegunda <zenobiusz.kunegunda@interia.pl>
To: "René Scharfe" <l.s.r@web.de>
Cc: Stefan Beller <sbeller@google.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: fatal: Could not get current working directory: Permission denied | affected 2.10,2.11,2.12, but not 1.9.5 |
Date: Wed, 22 Mar 2017 09:30:52 +0100 [thread overview]
Message-ID: <nmvyuyfhjvyycfsdyczr@tyca> (raw)
In-Reply-To: <3e8b756c-81bd-0a29-e032-d5733a8b3ed0@web.de>
After applying mentioned patch to git v2.12.0 I was not able to reproduce bug.Od: "René Scharfe" <l.s.r@web.de>
Do: "Zenobiusz Kunegunda" <zenobiusz.kunegunda@interia.pl>;
Wysłane: 20:06 Wtorek 2017-03-21
Temat: Re: fatal: Could not get current working directory: Permission denied | affected 2.10,2.11,2.12, but not 1.9.5 |
>
>> Am 21.03.2017 um 14:29 schrieb Zenobiusz Kunegunda:
>> I think I found a way to reproduce this error.
>> I installed FreeBSD 10.3 under qemu with zfs partitioning.
>> Test program did not report any access errors.
>> Then I did chmod 711 /usr/home
>> Now program started reporting permission denied errors just like this:
>> $ ./a.out
>> len = 0, errno = 22, Invalid argument
>> len = 1, errno = 34, Result too large
>> len = 2, errno = 13, Permission denied
>> len = 20, errno = 0, No error: 0
>
> Yes, and I think we can take ZFS out of the equation. As a regular user
> I get this with UFS and for $mode values of 000, 100 or 400 (with umask
> 0022):
>
> $ mkdir -p /tmp/a/b && cd /tmp/a/b
>
> $ chmod $mode /tmp/a && getcwdtest
> len = 0, errno = 22, Invalid argument
> len = 1, errno = 34, Result too large
> len = 2, errno = 13, Permission denied
> len = 9, errno = 0, No error: 0
>
> Only with both read and execute/search permissions for the intermediate
> directory I get rid of that irritating permission error for small buffers:
>
> $ chmod 500 /tmp/a && getcwdtest
> len = 0, errno = 22, Invalid argument
> len = 1, errno = 34, Result too large
> len = 9, errno = 0, No error: 0
>
> So a workaround for you would be to run "chmod a+rx" (or similar)
> against all parent directories of your repository. Another one would be
> to keep the path length below 128 characters (that's the initial buffer
> size in strbuf_getcwd()).
>
> Have you been able to test the patch I sent on Friday by any chance?
>
> Thanks,
> René
>
>
next prev parent reply other threads:[~2017-03-22 8:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 16:10 fatal: Could not get current working directory: Permission denied | affected 2.10,2.11,2.12, but not 1.9.5 | Zenobiusz Kunegunda
2017-03-08 17:36 ` René Scharfe
2017-03-09 11:01 ` Zenobiusz Kunegunda
2017-03-11 21:17 ` René Scharfe
2017-03-13 12:23 ` Zenobiusz Kunegunda
2017-03-13 17:31 ` René Scharfe
2017-03-14 15:25 ` Zenobiusz Kunegunda
2017-03-13 13:23 ` Zenobiusz Kunegunda
2017-03-13 21:31 ` René Scharfe
2017-03-14 7:44 ` Zenobiusz Kunegunda
2017-03-14 17:59 ` René Scharfe
2017-03-15 9:44 ` Zenobiusz Kunegunda
2017-03-15 21:30 ` René Scharfe
2017-03-17 19:34 ` René Scharfe
2017-03-17 19:45 ` Stefan Beller
2017-03-17 21:07 ` René Scharfe
2017-03-17 22:29 ` Jeff King
2017-03-17 22:50 ` René Scharfe
2017-03-21 13:29 ` Zenobiusz Kunegunda
2017-03-21 19:04 ` René Scharfe
2017-03-22 8:30 ` Zenobiusz Kunegunda [this message]
2017-03-21 10:08 ` Zenobiusz Kunegunda
2017-03-09 11:11 ` Zenobiusz Kunegunda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nmvyuyfhjvyycfsdyczr@tyca \
--to=zenobiusz.kunegunda@interia.pl \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).