git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ed Schofield" <edschofield@gmail.com>
To: git@vger.kernel.org
Subject: Re: Git newbie question: permissions
Date: Thu, 9 Oct 2008 23:59:40 +0100	[thread overview]
Message-ID: <1b5a37350810091559y151e244t43710d4e4c3dabcf@mail.gmail.com> (raw)
In-Reply-To: <2008-10-09-23-41-14+trackit+sam@rfc1149.net>

On Thu, Oct 9, 2008 at 10:41 PM, Samuel Tardieu <sam@rfc1149.net> wrote:
>>>>>> "Ed" == Ed Schofield <edschofield@gmail.com> writes:
>
> Ed> I have now run "git --bare init --shared=group" to reinitialize
> Ed> the repository. This seems to have changed the directories to be
> Ed> g+sx. (Is this all it did?). There are still some objects
> Ed> directories with 755 permissions rather than 770, which I presume
> Ed> I want, and the group ownership of these is wrong. Shall I change
> Ed> these by hand? The sha1 files all have 444 permissions; is this
> Ed> right?
>
> Ed> The last question I have is how to ensure that git creates object
> Ed> files etc. with the right permissions when users push in future.
>
> As Marc said, you should first make sure that "config" contains
> "sharedrepository = 1" in the "[core]" section.
>
> Then you can do the following:
>
>  - remove all permissions for "others":  chmod -R o-rwx .
>  - mirror "user" permissions to "group": chmod -R g=u .
>  - add +s flag to directories:           find . -type d | xargs chmod g+s
>
> This should fix your current situation. The "sharedrepository = 1"
> will tell git to maintain a proper shared state in the future
> on objects it creates (i.e. mirror "user" permission to "group" ones).

This worked beautifully. Thanks Sam, thanks Marc!

-- Ed

  reply	other threads:[~2008-10-09 23:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-09 20:20 Git newbie question: permissions Ed Schofield
2008-10-09 21:05 ` Samuel Lucas Vaz de Mello
2008-10-09 21:29 ` Marc Weber
2008-10-09 21:41 ` Samuel Tardieu
2008-10-09 22:59   ` Ed Schofield [this message]
2008-10-10 14:44   ` Samuel Lucas Vaz de Mello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b5a37350810091559y151e244t43710d4e4c3dabcf@mail.gmail.com \
    --to=edschofield@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).