From: Petr Baudis Date: Wed, 7 Mar 2012 11:25:48 +0000 (+0100) Subject: install fifo: Set correct permissions X-Git-Url: https://repo.or.cz/w/girocco.git/commitdiff_plain/900e9f8ce3f77d950a9fca685c5310395ae4be00 install fifo: Set correct permissions --- diff --git a/install.sh b/install.sh index 893f3c8..63d4b1c 100755 --- a/install.sh +++ b/install.sh @@ -13,6 +13,9 @@ perl -I. -M$GIROCCO_CONF -e '' . ./shlib.sh +owngroup="" +[ -z "$cfg_owning_group" ] || owngroup=".$cfg_owning_group" + echo "*** Setting up basedir..." rm -fr "$cfg_basedir" @@ -33,6 +36,8 @@ fi if [ -n "$cfg_push" -a "$cfg_permission_control" = "Group" ]; then echo "Creating FIFO for fixupd: $cfg_fixup_queue" mkfifo "$cfg_fixup_queue" + chown "$cfg_cgi_user""$owngroup" "$cfg_fixup_queue" || + echo "WARNING: Cannot chown $cfg_cgi_user.$cfg_owning_group $cfg_fixup_queue" echo "--- Remember to copy $cfg_basedir/fixupd/ to /root and start fixupd.sh as root" fi echo "--- Also remember to either start $cfg_basedir/jobd/jobd.sh, or add this" @@ -61,8 +66,6 @@ fi echo "*** Setting up jail configuration (project database)..." mkdir -p "$cfg_chroot" "$cfg_chroot/etc" touch "$cfg_chroot/etc/passwd" "$cfg_chroot/etc/group" -owngroup="" -[ -z "$cfg_owning_group" ] || owngroup=".$cfg_owning_group" chown "$cfg_cgi_user""$owngroup" "$cfg_chroot/etc" || echo "WARNING: Cannot chown $cfg_cgi_user.$cfg_owning_group the files" chmod 02775 "$cfg_chroot/etc" || echo "WARNING: Cannot chmod 02775 $cfg_chroot/etc"