git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elijah Newren <newren@gmail.com>
To: noloader@gmail.com
Cc: Git List <git@vger.kernel.org>
Subject: Re: SELinux context for Git user on Fedora server?
Date: Tue, 29 Oct 2019 23:34:37 -0700	[thread overview]
Message-ID: <CABPp-BFzAYmaQ5J0nnN9930UC5kJ1=qyvUJxL0oJNixLX3XQCQ@mail.gmail.com> (raw)
In-Reply-To: <CAH8yC8=uGb3J+fvkSj7-gdhqy0vtQw90K-MWQ3T1TTMQzAJnJA@mail.gmail.com>

Hi,

On Tue, Oct 29, 2019 at 10:30 PM Jeffrey Walton <noloader@gmail.com> wrote:
>
> Hi Everyone,
>
> I'm trying to setup a Git server on Fedora 30 server with SELinux in
> enforcing mode. I am following
> https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server
> .
>
> At the push on the local machine:
>
>   $ git push -v origin master
>   Pushing to ssh://git@euclid:/var/callboot/source.git

So you're using ssh...

>   Enter passphrase for key ...
>   fatal: '/var/callboot/source.git' does not appear to be a git repository
>   fatal: Could not read from remote repository.
>   ...
>
> I suspect the SELinux labels for /var/callboot/source.git are not
> quite right. Right now it looks as follows. httpd_sys_content_t is
> typical for a web server and I think it needs to be something else.
>
>   # ls -Z /var/callboot/source.git
>   unconfined_u:object_r:httpd_sys_content_t:s0 branches
>   unconfined_u:object_r:httpd_sys_content_t:s0 config
>   unconfined_u:object_r:httpd_sys_content_t:s0 description
>   unconfined_u:object_r:httpd_sys_content_t:s0 HEAD
>   unconfined_u:object_r:httpd_sys_content_t:s0 hooks
>   unconfined_u:object_r:httpd_sys_content_t:s0 info
>   unconfined_u:object_r:httpd_sys_content_t:s0 objects
>   unconfined_u:object_r:httpd_sys_content_t:s0 refs
>
> What should the SELinux labels be for the Git user?

They should be whatever is needed to access via ssh.  I think that's
something like 'ssh_home_t' (sorry, haven't fought SELinux and SSH for
a few years now), but the question isn't really anything to do with
Git but of the combination of SELinux and SSH.


Hope that helps,
Elijah

      reply	other threads:[~2019-10-30  6:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30  5:26 SELinux context for Git user on Fedora server? Jeffrey Walton
2019-10-30  6:34 ` Elijah Newren [this message]

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='CABPp-BFzAYmaQ5J0nnN9930UC5kJ1=qyvUJxL0oJNixLX3XQCQ@mail.gmail.com' \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=noloader@gmail.com \
    /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).