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

Re: preserve permissions?

From
Andrew Keller <andrew@kellerfarm.com>
Date
May 4, 2010, 18:44 UTC
Message-ID
<1D033321-2F57-44BF-B27F-D7450AFC85E6@kellerfarm.com>
In-Reply-To
<C1288762-C750-4919-A853-5E3229870A59@btinternet.com>
On May 4, 2010, at 8:29 AM, Jonathan Chetwynd wrote:
Show 5 quoted lines
> ...
> 
> what is the reason permissions are not preserved?
> 
> ...
Git implements a network of trust permission model.  In this model, system permissions are used (among other things) to control who has access to a repository.  Once someone has access, they can perform a clone or a fetch.  This process downloads refs into a local repository that inherits your local permissions.  This model is simple, but it is often capable of most things that system permissions can do, and it avoids the problem of a given user in the repository not existing on a machine.
One of the implications of this model is that although system permissions can be used to control who has access to a repository, they are not stored in the repository itself.  This means that if you clone a repository, the system permissions of the repository are never preserved.  This is a very intentional detail of the network of trust permission model.  Once a user has access to a repository, that user has access to the whole repository.  It is exactly like telling another person something.  Once the other person hears the data, that person can do whatever he or she wants with it.  He or she "owns" a copy of the data.
In other words, if you want a user X to own a repository upon cloning, then user X must be the one to perform the clone.  If you want Sue to know that the new kitchen table is made of oak, then Sue must be the one to ask the question (aka clone or fetch).  You cannot ask the question for Sue and expect her to instantly know what you know.

HTH ~ Andrew Keller

Previous: Jakub Narebski
Message 5 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.