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

Re: preserve permissions?

From
Jakub Narebski <jnareb@gmail.com>
Date
May 4, 2010, 13:08 UTC
Message-ID
<m3fx27g6i8.fsf@localhost.localdomain>
In-Reply-To
<C1288762-C750-4919-A853-5E3229870A59@btinternet.com>
Jonathan Chetwynd <j.chetwynd@btinternet.com> writes:
Show 7 quoted lines
> git clone ../xsl-test/
> 
> the original has a single directory, owner _www, and a few files.
> 
> however the clone directory has owner Me.
> 
> what is the reason permissions are not preserved?

Why should permissions be preserved? Git is a version control system, meant mainly for software management, not a backup system.

When you clone repository from somebody, you don't want for files to have that somebody ownership, especially that such user most probably do not exist on your machine.

Therefore git does not store ownership, and only basic permissions (only executable bit for ordinary files, and the symlink bit).

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Jonathan ChetwyndNext: snk
Message 2 of 5 in “preserve permissions?”
  1. Jonathan ChetwyndMay 4, 2010
  2. Jakub NarebskiMay 4, 2010
  3. snkMar 3, 2012
  4. Jakub NarebskiMar 3, 2012
  5. Andrew KellerMay 4, 2010

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.