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

Re: Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 23, 2015, 15:13 UTC
Message-ID
<xmqqwpvhxj63.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<5f56381a3cf5a5ccf6a1e4e3ea48f516@dscho.org>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 8 quoted lines
>> A .git/tmp/ would make housekeeping easier, you would know that every
>> file under .git
>> should be there and if you find something you don't recognize you would react.
>
> No, it would actually make it harder. I seem to recall that there was
> some problem with renaming a file unless it was already in the same
> directory as the destination. If all files were to be written to
> .git/tmp/ first...

I agree with you here. This "some filesystems do not like cross-directory renames" was also why I thought the idea to create everything in $GIT_DIR/tmp and moving to the final destination would not fly well.

For the specific issue with the shallow-cutoff list temporarily created, however, it is created, written to, read from and removed without ever leaving the original place, so we could designate one writable "temporary" place somewhere under $GIT_DIR, and $GIT_DIR/tmp could certainly that designated temporary place.

By the way, the temporary shallow-cutoff-list is created by callingy xmks_tempfile(). I wonder if it can safely changed to use mks_tempfile() instead. That way, people can set up a wrapper for receive-pack that sets up a suitable TMPDIR exported to the real thing to relocate it.

Previous: Johannes SchindelinNext: Joakim Tjernlund
Message 18 of 20 in “Unable to create temporary file '/var/git/tmv3-target-overlay.git/shallow_Un8ZOR': Permission denied”
  1. Joakim TjernlundAug 21, 2015
  2. Joakim TjernlundAug 21, 2015
  3. Joakim TjernlundAug 31, 2015
  4. Duy NguyenAug 31, 2015
  5. Joakim TjernlundSep 14, 2015
  6. Duy NguyenSep 17, 2015
  7. Joakim TjernlundSep 17, 2015
  8. Duy NguyenSep 19, 2015
  9. Duy NguyenSep 19, 2015
  10. Johannes SchindelinSep 19, 2015
  11. Joakim TjernlundSep 20, 2015
  12. Joakim TjernlundSep 19, 2015
  13. Junio C HamanoSep 21, 2015
  14. Joakim TjernlundSep 21, 2015
  15. Johannes SchindelinSep 22, 2015
  16. Joakim TjernlundSep 22, 2015
  17. Johannes SchindelinSep 23, 2015
  18. Junio C HamanoSep 23, 2015
  19. Joakim TjernlundSep 23, 2015
  20. Johannes SchindelinSep 23, 2015

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.