# Security and permissions in git

3 messages from 2009-01-29 to 2009-01-29. Participants: Jay Renbaum, Daniel Barkalow, Jeff King.
Thread: https://gitlist.dev/t/17446

## Jay Renbaum, 2009-01-29 20:34

Subject: Security and permissions in git
Message-ID: <loom.20090129T203050-865@post.gmane.org>
URL: https://gitlist.dev/e/loom.20090129T203050-865%40post.gmane.org

```
When setting up a public repository is there a way to control who has access 
to various directories within the repository or is everything equal once you 
are in?

```

## Daniel Barkalow, 2009-01-29 22:13

Subject: Re: Security and permissions in git
Message-ID: <alpine.LNX.1.00.0901291645300.19665@iabervon.org>
URL: https://gitlist.dev/e/alpine.LNX.1.00.0901291645300.19665%40iabervon.org
In-Reply-To: <loom.20090129T203050-865@post.gmane.org>

```
On Thu, 29 Jan 2009, Jay Renbaum wrote:

> When setting up a public repository is there a way to control who has access 
> to various directories within the repository or is everything equal once you 
> are in?

Every commit contains a version of the complete contents, so people have 
to be able to read the contents of all directories and write some 
directory contents. However, you can prohibit users from pushing content 
to the repository unless particular directories (or files) match what's 
there already. This is generally what people want when they have this 
requirement.

It's also possible to use submodules to have a project contain parts that 
some users don't have any access to, while still being able to produce 
commits to the main project (in combination with the above check so that 
try can't replace the submodule entirely with content they do have access 
to, or submodule commits they've seen referenced previously)

	-Daniel
*This .sig left intentionally blank*

```

## Jeff King, 2009-01-29 23:23

Subject: Re: Security and permissions in git
Message-ID: <20090129232358.GA12941@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20090129232358.GA12941%40coredump.intra.peff.net
In-Reply-To: <alpine.LNX.1.00.0901291645300.19665@iabervon.org>

```
On Thu, Jan 29, 2009 at 05:13:41PM -0500, Daniel Barkalow wrote:

> Every commit contains a version of the complete contents, so people have 
> to be able to read the contents of all directories and write some 
> directory contents. However, you can prohibit users from pushing content 
> to the repository unless particular directories (or files) match what's 
> there already. This is generally what people want when they have this 
> requirement.

If this is what you want, see Shawn's contrib/hooks/update-paranoid,
which lets you specify ACLs in the config.

-Peff

```
