From 1bdc42ace5d121d8e8a9fad41c494bec9775d7eb Mon Sep 17 00:00:00 2001 From: Mattia Penati Date: Thu, 11 Jan 2024 12:37:01 +0100 Subject: [PATCH] disable read-only mode --- Dockerfile | 1 + README.md | 2 ++ run-vsftpd.sh | 2 +- vsftpd.conf | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 17cab08..df42a2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM alpine:${ALPINE_VERSION} ENV FTP_USER=user ENV FTP_PASS=password +ENV FTP_WRITE_ENABLE=NO RUN set -eux; \ apk update; \ diff --git a/README.md b/README.md index 5d311ec..0195345 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ credentials: * `FTP_USER`: username for the FTP account (default: `user`) * `FTP_PASS`: password for the FTP account (default: `password`) +* `FTP_WRITE_ENABLE`: set to `NO` (default) to make the FTP read only, set to + `YES` to enable write permissions ## Ports and volumes diff --git a/run-vsftpd.sh b/run-vsftpd.sh index 1467755..4361a2a 100644 --- a/run-vsftpd.sh +++ b/run-vsftpd.sh @@ -6,4 +6,4 @@ echo "$FTP_USER:$FTP_PASS" | chpasswd >& /dev/null touch /var/log/vsftpd.log tail -f /var/log/vsftpd.log >> /dev/stdout & -vsftpd /etc/vsftpd/vsftpd.conf +vsftpd -owrite_enable=${FTP_WRITE_ENABLE} /etc/vsftpd/vsftpd.conf diff --git a/vsftpd.conf b/vsftpd.conf index d8bd742..0070172 100644 --- a/vsftpd.conf +++ b/vsftpd.conf @@ -13,7 +13,7 @@ allow_writeable_chroot=YES passwd_chroot_enable=YES # read only mode -write_enable=NO +# write_enable=NO # message dirmessage_enable=YES