add ftp server
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
mkdir -p /var/run/vsftpd/empty
|
||||
|
||||
FTP_PASSWORD=$(cat /run/secrets/ftp_password)
|
||||
|
||||
if ! id "${FTP_USER}" >/dev/null 2>&1; then
|
||||
useradd -o -u 33 -g www-data -d /var/www/html -s /usr/sbin/nologin "${FTP_USER}"
|
||||
fi
|
||||
|
||||
echo "${FTP_USER}:${FTP_PASSWORD}" | chpasswd
|
||||
|
||||
exec /usr/sbin/vsftpd /etc/vsftpd.conf
|
||||
Reference in New Issue
Block a user