diff --git a/.gitignore b/.gitignore index 485dee6..3ebbbaa 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .idea +logs/* diff --git a/Dockerfile b/Dockerfile index a3a5cad..003fd0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,16 @@ -FROM centos:7 +FROM quay.io/centos/centos:stream9 ARG USER_ID=14 ARG GROUP_ID=50 MAINTAINER Fer Uria -LABEL Description="vsftpd Docker image based on Centos 7. Supports passive mode and virtual users." \ +LABEL Description="vsftpd Docker image based on Centos 9. Supports passive mode and virtual users." \ License="Apache License 2.0" \ Usage="docker run -d -p [HOST PORT NUMBER]:21 -v [HOST FTP HOME]:/home/vsftpd fauria/vsftpd" \ Version="1.0" RUN yum -y update && yum clean all -RUN yum install -y \ - vsftpd \ - db4-utils \ - db4 \ - iproute && yum clean all +RUN yum install -y vsftpd libdb-utils iproute && yum clean all RUN usermod -u ${USER_ID} ftp RUN groupmod -g ${GROUP_ID} ftp diff --git a/README.md b/README.md index 18b68e6..5475320 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ This Docker container implements a vsftpd server, with the following features: - * Centos 7 base image. - * vsftpd 3.0 + * Centos 9 base image. + * vsftpd 3.0.3 * Virtual users * Passive mode * Logging to a file or `STDOUT`. diff --git a/docker-compose.yml b/docker-compose.yml index dd23e90..5b0de1f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,4 +16,4 @@ services: - 21100-21110:21100-21110 volumes: - ./home:/home/vsftpd - - ./logs:/var/log/vsftpd + - ./logs/vsftpd.log:/var/log/vsftpd.log diff --git a/vsftpd.conf b/vsftpd.conf index 1f77ed2..8b6376e 100644 --- a/vsftpd.conf +++ b/vsftpd.conf @@ -37,15 +37,19 @@ allow_writeable_chroot=YES hide_ids=YES ## Enable logging +dual_log_enable=YES +log_ftp_protocol=NO +vsftpd_log_file=/var/log/vsftpd/vsftpd.log xferlog_enable=YES -xferlog_file=/var/log/vsftpd/vsftpd.log +xferlog_std_format=YES +xferlog_file=/var/log/vsftpd/xferlog ## Enable active mode port_enable=YES connect_from_port_20=YES ftp_data_port=20 -## Disable seccomp filter sanboxing +## Disable seccomp filter sanboxing seccomp_sandbox=NO ### Variables set at container runtime