git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] apply: don't use core.sharedRepository to create working tree files

From
AGAchim Gratz <stromeko@nexgo.de>
Date
Dec 19, 2020, 21:01 UTC
Message-ID
<87pn354ijn.fsf@Rainer.invalid>
In-Reply-To
<CA+kUOam3h859kK76QuS9OFojeavXO15JNpinUQ0vPrAXrcsCoA@mail.gmail.com>
Adam Dinwoodie writes:
Show 6 quoted lines
> Having done a bit more digging, you're (unsurprisingly) right that
> this seems to be about permissions rather than mount points per se. I
> see the same failure with a build in
> /cygdrive/c/Users/Adam/Documents/git, though, where that directory was
> created solely using Git commands with the installed version of Cygwin
> Git (v2.29.2-1).

Windows is "protecting" various directories and that can get in the way as well.

> I'm using a test VM here that was created from
> scratch solely to run these tests, and where there has only ever been
> a single login user account, so the permissions setup should be about
> as straightforward as they possibly could be.

You haven't shown what these are in detail, though. Use getfacl to see what Cygwin thinks the permissions are and icacls to get the Windows view. Once you know what the ACL look like it usually becomes clear what you need to do to get what you want. In your particular case I'd try to recursively do a 'setfacl -kb' to remove all ACL and inheritable defaults. Again, it's possible that your user has insufficient permisions to do that (which will then result in some ACL still present, i.e. a '+' sign after the permission bits in 'ls -l' output).

Keep in mind that running things as a member of the Administrator group usually confers some extra permissions on top of that, like Backup/Restore privileges.

Show 6 quoted lines
> This seems like a scenario that Cygwin should be able to handle, but I
> don't have a clear enough grasp of how Windows ACLs work in normal
> circumstances, let alone when Cygwin is handling them in its
> non-standard ways, to know what an appropriate solution here is. "Only
> ever build things within the Cygwin home directory" seems like a
> decidedly suboptimal workaround, though.

I have a dedicated build directory outside anything that Windows cares about and mount that under /mnt/share from Cygwin. I usually remove all inheritable and default ACL on the toplevel directory before populating it.

Regards, Achim.

-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Previous: Adam DinwoodieNext: Adam Dinwoodie
Message 10 of 17 in “Is git-am expected to honor core.sharedRepository?”
  1. Matheus Tavares BernardinoDec 1, 2020
  2. Junio C HamanoDec 1, 2020
  3. apply: don't use core.sharedRepository to create working tree filesMatheus Tavares, Dec 1, 2020
  4. Junio C HamanoDec 2, 2020
  5. Adam DinwoodieDec 19, 2020
  6. Junio C HamanoDec 19, 2020
  7. Adam DinwoodieDec 19, 2020
  8. Achim GratzDec 19, 2020
  9. Adam DinwoodieDec 19, 2020
  10. Achim GratzDec 19, 2020
  11. Adam DinwoodieDec 22, 2020
  12. Matheus Tavares BernardinoDec 22, 2020
  13. t4129: fix setfacl-related permissions failureAdam Dinwoodie, Dec 23, 2020
  14. Matheus Tavares BernardinoJan 9, 2021
  15. Junio C HamanoJan 9, 2021
  16. Junio C HamanoDec 2, 2020
  17. Matheus Tavares BernardinoDec 3, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.