git-server-docker-stagit

git-server-with-stagit
git clone git://git.andersuno.nu/git-server-docker-stagit.git
Log | Files | Refs | README

commit 371e509e62889609c55769a3cb6e8ff95ce11e57
parent 2ed3bd3ac23ca6e52fffcdf3f77b9779d364fc75
Author: Akuario <jkarlos.b@gmail.com>
Date:   Sun, 12 Feb 2017 18:06:39 +0100

Added permission check in repos folder

Diffstat:
Mstart.sh | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/start.sh b/start.sh @@ -1,15 +1,23 @@ #!/bin/sh -cd /home/git - # If there is some public key in keys folder # then it copies its contain in authorized_keys file if [ "$(ls -A /git-server/keys/)" ]; then + cd /home/git cat /git-server/keys/*.pub > .ssh/authorized_keys chown -R git:git .ssh chmod 700 .ssh chmod -R 600 .ssh/* fi +# Checking permissions and fixing SGID bit in repos folder +# More info: https://github.com/jkarlosb/git-server-docker/issues/1 +if [ "$(ls -A /git-server/repos/)" ]; then + cd /git-server/repos + chown -R git:git . + chmod -R ug+rwX . + find . -type d -exec chmod g+s '{}' + +fi + # -D flag avoids executing sshd as a daemon /usr/sbin/sshd -D