fauria / docker-vsftpd

🐳 vsftpd Docker image based on Centos 7. Supports passive mode and virtual users.
https://hub.docker.com/r/fauria/vsftpd/
Apache License 2.0
414 stars 341 forks source link

STDOUT not working #59

Open rpesciotta opened 3 years ago

rpesciotta commented 3 years ago

Hi, I've tried for the first time using this image, and I noticed that the STDOUT is not working as I expected, since I don't see any connect or transfer messages. I'm starting the container using docker-compose, and I set the Environment Variable as documented. However, after testing for sometime, I only saw one single log message on the console. So I opened a terminal inside the running container, and I noticed there are 2 vsftpd.log files under /var/log, as follows:

/var/log:

[root@6b28dbacc585 log]# find . -ls | grep vsftp
1104614   16 -rw-------   1 root     root        14757 Nov  9 19:18 ./vsftpd.log
970431    4 drwxr-xr-x   2 root     root         4096 Nov  9 19:00 ./vsftpd
970441    0 lrwxrwxrwx   1 root     root           11 Nov  9 19:00 ./vsftpd/vsftpd.log -> /dev/stdout

Apparently, the location /var/log/vsftpd/vsftpd.log has been corretly redirected to /dev/stdout, but the most messages are being logged into a different location, /var/log/vsftpd.log.

I checked the configuration file being used, and it does point to the location that is redirected to stdout, but for some reason, the situation I just described is taking place.

/etc/vsftpd/vsftpd.conf:

[root@6b28dbacc585 log]# grep log /etc/vsftpd/vsftpd.conf
# Uncomment this to allow local users to log in.
## Enable logging
xferlog_enable=YES
xferlog_file=/var/log/vsftpd/vsftpd.log
xferlog_std_format=NO

Am I doing something wrong, or is there maybe a problem here? I appreciate any support.

sm809 commented 3 years ago

+1 to the above. I am facing the exact same issue.

vecjh commented 3 years ago

I guess this is because "xferlog_file" is only used if "xferlog_std_format=YES". Otherwise the path is driven by "vsftpd_log_file" which is not defined in this container.

eelcowen commented 3 years ago

Looks like vsftpd logs to /var/log/vsftpd.log and not /var/log/vsftpd/vsftpd.log so the the run-vsftpd.sh script is incorrect.

TmyWu commented 1 year ago

Is this repository still 'active'?? I also cannot see logs in STDOUT.

fauria commented 1 year ago

It is. Labeling this issue as look.

DanceMore commented 1 year ago

yeah, I followed the documentation on DockerHub https://hub.docker.com/r/fauria/vsftpd

LOG_STDOUT doesn't seem to do anything. logs still land ""on disk"" inside the container. thanks for checking into it tho :)