From: Steve Folly <steve@spfweb.co.uk>
To: git@vger.kernel.org
Subject: init --shared=0666 isn't
Date: Tue, 9 Mar 2010 22:31:56 +0000 (UTC) [thread overview]
Message-ID: <loom.20100309T224207-485@post.gmane.org> (raw)
Using git 1.7.0.2 on Mac OS X 10.6.2:
$ git init --bare --shared=0666 /tmp/shared.git
$ git --git-dir=/tmp/shared.git remote add --mirror \
origin git://git.kernel.org/pub/scm/git/git.git
$ git --git-dir=/tmp/shared.git fetch origin
# login as someone else; different uid, different gid, then:
$ git --git-dir=/tmp/shared.git fetch origin
error: cannot open /tmp/shared.git/FETCH_HEAD: Permission denied
FETCH_HEAD is owned by the original user, with 0644 permissions,
not 0666 as originally requested.
I've only had a quick glance at the source - my first guess
is that in builtin-fetch.c, store_updated_refs and
truncate_fetch_head should call adjust_shared_perm after
closing the file being written? Or, should an empty FETCH_HEAD
with appropriate shared perms be written during init?
In my case I'm using /tmp/shared.git as a mirror for other
local repositories init'ed with --reference=/path/to/mirror.git
and all I'll be doing if fetching into it periodically, so I think fixing
FETCH_HEAD will suffice for me.
But, I wonder if there are other files written that will need fixing
also - ORIG_HEAD, MERGE_HEAD?
Is there a workaround for this or am I doing something wrong?
Thanks for any help.
Regards,
Steve
next reply other threads:[~2010-03-09 22:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 22:31 Steve Folly [this message]
2010-03-09 23:51 ` init --shared=0666 isn't Junio C Hamano
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=loom.20100309T224207-485@post.gmane.org \
--to=steve@spfweb.co.uk \
--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).