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

Re: get git not to care about permissions

From
Thomas Rast <trast@student.ethz.ch>
Date
Nov 12, 2009, 16:10 UTC
Message-ID
<200911121710.44314.trast@student.ethz.ch>
In-Reply-To
<3cf217d80911120744g5e020003rc00c460fff0bff1d@mail.gmail.com>
Matt Schoen wrote:
Show 8 quoted lines
> error: Unable to open
> /ad/eng/courses/ec/ec464/ec464-team03/test.git/HEAD.lock for writing
> 
> ls -al in the directory gives me:
> total 12
> drwx------ 3 schoen root 4096 Nov 12 10:41 .
> d--------- 7 root   root 4096 Nov 12 10:41 ..
> -rwx------ 1 schoen root    0 Nov 12 10:41 HEAD.lock
At least in my current copy, this can only come from
	// lock.c:1371
	lockpath = mkpath("%s.lock", git_HEAD);
	fd = open(lockpath, O_CREAT | O_EXCL | O_WRONLY, 0666);
	if (fd < 0) {
		error("Unable to open %s for writing", lockpath);

It prints an absolute path, so the open() also accesses an absolute path (though I don't know why it insists on that).

But the above directory listing would indicate that you do not even have permission to look inside your $(pwd) by absolute path...

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Matt SchoenNext: Matt Schoen
Message 4 of 8 in “get git not to care about permissions”
  1. sconemanNov 9, 2009
  2. Jay SoffianNov 12, 2009
  3. Matt SchoenNov 12, 2009
  4. Thomas RastNov 12, 2009
  5. Matt SchoenNov 12, 2009
  6. Thomas RastNov 15, 2009
  7. Eugene SajineNov 12, 2009
  8. Matt SchoenNov 12, 2009

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.