From 039a989fb243bd12ea329b1e64370c2dc0e65ae9 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 8 Dec 2016 16:20:48 +0200 Subject: [PATCH] fix for aditional ftp accounts --- bin/v-add-web-domain-ftp | 2 +- func/rebuild.sh | 2 +- install/vst-install-debian.sh | 3 +++ install/vst-install-rhel.sh | 3 +++ install/vst-install-ubuntu.sh | 3 +++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/v-add-web-domain-ftp b/bin/v-add-web-domain-ftp index 699a8ba96..67afc6440 100755 --- a/bin/v-add-web-domain-ftp +++ b/bin/v-add-web-domain-ftp @@ -51,7 +51,7 @@ is_password_valid get_domain_values 'web' # Defining ftp user shell -shell='/sbin/nologin' +shell=$(which nologin) if [ ! -z "$FTP_SHELL" ]; then shell=$FTP_SHELL fi diff --git a/func/rebuild.sh b/func/rebuild.sh index 5e532ca5d..7b62dd54f 100644 --- a/func/rebuild.sh +++ b/func/rebuild.sh @@ -268,7 +268,7 @@ rebuild_web_domain_conf() { # Adding ftp users if [ -z "$FTP_SHELL" ]; then - shell='/sbin/nologin' + shell=$(which nologin) if [ -e "/usr/bin/rssh" ]; then shell='/usr/bin/rssh' fi diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index d2a705c26..25973e94e 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -886,6 +886,9 @@ if [ "$vsftpd" = 'yes' ]; then update-rc.d vsftpd defaults service vsftpd start check_result $? "vsftpd start failed" + + # To be deleted after release 0.9.8-18 + echo "/sbin/nologin" >> /etc/shells fi diff --git a/install/vst-install-rhel.sh b/install/vst-install-rhel.sh index de9606f62..88bca3525 100755 --- a/install/vst-install-rhel.sh +++ b/install/vst-install-rhel.sh @@ -937,6 +937,9 @@ if [ "$vsftpd" = 'yes' ]; then chkconfig vsftpd on service vsftpd start check_result $? "vsftpd start failed" + + # To be deleted after release 0.9.8-18 + echo "/sbin/nologin" >> /etc/shells fi diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh index 138f6c0bf..6e9937183 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -901,6 +901,9 @@ if [ "$vsftpd" = 'yes' ]; then update-rc.d vsftpd defaults service vsftpd start check_result $? "vsftpd start failed" + + # To be deleted after release 0.9.8-18 + echo "/sbin/nologin" >> /etc/shells fi