Skip to content

Commit

Permalink
disable read-only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiapenati committed Jan 11, 2024
1 parent 045163d commit 1bdc42a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion run-vsftpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion vsftpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1bdc42a

Please sign in to comment.