From: "David C. Rankin" <drankinatty@gmail.com>
To: Jamie Landeg-Jones <jamie@catflap.org>,
Johannes.Schindelin@gmx.de, gitster@pobox.com
Cc: msuchanek@suse.de, git@vger.kernel.org
Subject: Re: Local git server can't serve https until repos owned by http, can't serve ssh unless repos owned by user after 2.45.1
Date: Sun, 28 Jul 2024 01:57:18 -0500 [thread overview]
Message-ID: <0ae914c6-70be-44b8-a6b8-53f0b15d5674@gmail.com> (raw)
In-Reply-To: <202407280346.46S3khd9005129@donotpassgo.dyslexicfish.net>
On 7/27/24 10:46 PM, Jamie Landeg-Jones wrote:
> From what I gather, the idea was to stop a client user from unintentionally
> running potential hook scripts that could be evil. A similar protection was
> already present, I note, for other methods (I couldn't run git log and other
> commands directly on a repo i had unix-level read access to, but were owned
> by another user until I added the safe directory thing in .gitconfig)
>
> Closing this hole to make security more consistent is fair enough... however,
> in the case of git-http-backend the "safe directory" method doesn't work at
> all!
>
> Is this an accurate summary of the situation?
Yes it is.
Prior to the change, the repositories on my git server were owned by the
user with push privileges and all repositories would still be cloned over
https. Now unless the files are owned by http (what the web server runs as on
Archlinux), https users cannot update their repositories anymore. Changes
pushed to the server by the user with ssh access (and owner of the files)
cannot be pulled over https.
On the other side of the issue, if I make the webserver the owner of the
repos, the ssh user cannot push or pull.
Gitweb remains happy no matter the ownership.
I'm all for more security and welcome it, but you have to provide a way to
configure it so that prior functionality is simply not broken. I'll have to
search and find the little truth-table style of repo user:group ownership and
the resulting succeed:fail with push/pull from the server.
I'd be happy if the docs were just updated with a concise explanation of
how to support both ssh and https to the same repo running under Apache -- if
that is doable. It must be, github does it. I haven't had the time I'd like to
to further investigate. Next month looks better.
--
David C. Rankin, J.D.,P.E.
next prev parent reply other threads:[~2024-07-28 6:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 0:36 Local git server can't serve https until repos owned by http, can't serve ssh unless repos owned by user after 2.45.1 David C. Rankin
2024-06-17 18:47 ` Junio C Hamano
2024-06-17 21:15 ` Michal Suchánek
2024-06-25 7:24 ` Michal Suchánek
2024-06-25 16:12 ` Junio C Hamano
2024-06-25 18:34 ` Michal Suchánek
2024-06-26 13:03 ` Phillip Wood
2024-06-26 18:14 ` Junio C Hamano
2024-06-26 18:35 ` Phillip Wood
2024-06-26 18:51 ` Junio C Hamano
2024-09-25 11:34 ` Michal Suchánek
2024-08-29 20:34 ` Joey Hess
2024-07-26 0:38 ` Jamie Landeg-Jones
2024-07-26 5:58 ` David C. Rankin
2024-07-28 3:46 ` Jamie Landeg-Jones
2024-07-28 6:57 ` David C. Rankin [this message]
2024-08-01 0:15 ` [SOLVED] " Jamie Landeg-Jones
2024-08-02 19:31 ` Junio C Hamano
2024-06-18 1:08 ` David C. Rankin
2024-06-24 14:53 ` 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=0ae914c6-70be-44b8-a6b8-53f0b15d5674@gmail.com \
--to=drankinatty@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jamie@catflap.org \
--cc=msuchanek@suse.de \
/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).