git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tarmigan <tarmigan+git@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	Tay Ray Chuan <rctay89@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH v3] Smart-http documentation: add example of how to  execute from userdir
Date: Mon, 4 Jan 2010 23:59:10 -0800	[thread overview]
Message-ID: <905315641001042359h7850c6cdrf9160030aff67839@mail.gmail.com> (raw)
In-Reply-To: <20100104140616.GB22872@spearce.org>

On Mon, Jan 4, 2010 at 6:06 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
> Junio C Hamano <gitster@pobox.com> wrote:
>> I still see Cc: here; are people named above (and others commented on
>> earlier versions) happy with this round?
>
> I don't get why Options +SymLinksIfOwnerMatch is needed here.
>
> If we are linking to the root installed git-http-backend Apache
> will actually reject the link, because the link owner is likely to
> be $USER while the target is owned by root.
>
> So I really can't ACK this, the instructions don't jive with my
> understanding of the Apache configuration.

Fair enough.

There seem to be three reasonable ways to run from a userdir
(depending on what the global configuration allows):
- symlink to global git installation (if FollowSymLinks)
- symlink to user's git installation (if not FollowSymLink and only
SymLinkIfOwnerMatch)
- copy of git-http-backend binary (if no symlinks are followed)

The Options +SymLinksIfOwnerMatch is left over from when there was a
more detailed description of the second scenario and should probably
be removed now.  The user may not have a choice about which of those
three can be used because it depends on the global server
configuration (which presumably the user does not control) so it's
difficult to provide instructions that will work for everyone.  The
last option is likely to be the most portable, but also does not get
updated when the primary http-backend binary is updated.

Enumerating the details of setting up all of these configurations in
the man page seems excessive, but it would also be nice to have enough
information to still make it easy.

We could do one or more of the following:
- Remove the Options +SymLinksIfOwnerMatch as it is too specific to an
unknown configuration and let users figure out how to get symlinks to
work for their particular configuration
- Add a note to remind the user about SymLinksIfOwnerMatch or FollowSymLinks
- Emphasize copying git-http-backend binary into the cgi-bin directory
as that is likely the most portable across configurations
- Expand all three scenarios in detail

I'm inclined to do the first two with the following patch (cut-n-paste
warning) squashed in.  I'll send the complete patch as a follow up.

Thanks,
Tarmigan

diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend
index 0485033..7af1288 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -160,13 +160,14 @@ From UserDir on Apache 2.x::
 +
 ----------------------------------------------------------------
 SetHandler cgi-script
-Options +SymLinksIfOwnerMatch
 SetEnv GIT_PROJECT_ROOT /home/$username/devel
 ----------------------------------------------------------------
 +
 Also add any needed authentication to the .htaccess file as discussed
 in earlier examples.
 +
+Depending on the global configuration of the web server, the
+"FollowSymLinks" or "SymLinksIfOwnerMatch" options might be needed.
 If the web server does not follow any symbolic links, the
 'git-http-backend' executable may be copied into the cgi-bin directory
 and renamed to 'git' to acheive the same effect, but it will also need

  reply	other threads:[~2010-01-05  7:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-26 17:07 [PATCH] Smart-http documentation: add example of how to execute from userdir Tarmigan Casebolt
2009-12-27  3:19 ` Tay Ray Chuan
2009-12-28  4:18   ` Tarmigan
2009-12-28  4:46     ` [PATCH v2] " Tarmigan Casebolt
2009-12-31  2:18       ` Tay Ray Chuan
2010-01-02 21:18         ` [PATCH v3] " Tarmigan Casebolt
2010-01-03  2:11           ` Tay Ray Chuan
2010-01-03  8:34           ` Junio C Hamano
2010-01-04 14:06             ` Shawn O. Pearce
2010-01-05  7:59               ` Tarmigan [this message]
2010-01-05  7:59                 ` [PATCH v4] " Tarmigan Casebolt
2010-01-05  8:23                   ` Junio C Hamano
2009-12-27 21:15 ` [PATCH] " Shawn O. Pearce
2009-12-28  4:06   ` Tarmigan

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=905315641001042359h7850c6cdrf9160030aff67839@mail.gmail.com \
    --to=tarmigan+git@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rctay89@gmail.com \
    --cc=spearce@spearce.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).