fix chrootdir perms

This commit is contained in:
Oliver Atkinson 2023-12-14 02:31:31 -07:00
parent c75ebcfef6
commit d2cc661ed8

View File

@ -15,6 +15,9 @@ if ! id "$USER" 2&>/dev/null; then
fi
CHROOT=$(eval echo ~$USER)
# ChrootDirectory requires these permissions
chown root:root $CHROOT
chmod 745 $CHROOT
printf "Match User $USER\n ChrootDirectory $CHROOT" > /etc/ssh/sshd_config.d/70-$USER.conf
# cp in all commands and dependencies