From 796341c7a0ffda0acdf64cffe0bea2cc7416a21a Mon Sep 17 00:00:00 2001 From: paspo Date: Thu, 31 Jul 2025 15:26:45 +0200 Subject: [PATCH] FIX #2: added DISABLE_SFTP flag --- rootfs/app/entrypoint.sh | 2 ++ rootfs/app/entrypoint.sh.d/90_ssh.sh | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rootfs/app/entrypoint.sh b/rootfs/app/entrypoint.sh index 9203b36..c1edcb0 100755 --- a/rootfs/app/entrypoint.sh +++ b/rootfs/app/entrypoint.sh @@ -25,6 +25,7 @@ FPM_MIN_SPARE_SERVERS=${FPM_MIN_SPARE_SERVERS:-1} FPM_MAX_SPARE_SERVERS=${FPM_MAX_SPARE_SERVERS:-3} DISABLE_WEBROOT_CHOWN=${DISABLE_WEBROOT_CHOWN:-0} +DISABLE_SFTP=${DISABLE_SFTP:-0} export USERNAME export GROUPNAME @@ -49,6 +50,7 @@ export FPM_MIN_SPARE_SERVERS export FPM_MAX_SPARE_SERVERS export DISABLE_WEBROOT_CHOWN +export DISABLE_SFTP # run all scripts in order run-parts /app/entrypoint.sh.d diff --git a/rootfs/app/entrypoint.sh.d/90_ssh.sh b/rootfs/app/entrypoint.sh.d/90_ssh.sh index 11e2160..53367a7 100755 --- a/rootfs/app/entrypoint.sh.d/90_ssh.sh +++ b/rootfs/app/entrypoint.sh.d/90_ssh.sh @@ -1,5 +1,9 @@ #!/bin/sh +if [ ${DISABLE_SFTP} -eq 1 ] ; then + exit 0 +fi + echo "# Configuring ssh" # make sure directory exists @@ -23,8 +27,7 @@ if [ -d "${PATH_WEBROOT}/.ssh" ] ; then chmod 0700 "${PATH_WEBROOT}/.ssh" fi - - +# configure sshd cat >/etc/ssh/sshd_config.d/sshd.conf <