Can someone tell me where is located the log file for vsftpd? I'm trying to learn how to install and configure a ftp server and I can't seem to find the log file. Can anybody tell me how to configure the service to make a log file or where is located?
3 Answers
The log file for Ubuntu by default is /var/log/vsftpd.log. The setting is in /etc/vsftpd.conf
The default could be modified by specifying a different pathname (/etc/vsftp.conf entry):
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
- 39,359
- 25,444
The logging of vsftpd is a bit more complex than other responses show. There are three logging mechanism, here is an example config of /etc/vsftpd.conf where I have added some comments for self-explanation:
# Below verbose log is for transfer/upload, formatted for common tools stats.
# Use command: tail -f /var/log/xferlog
xferlog_enable=YES
xferlog_file=/var/log/xferlog
xferlog_std_format=YES
Below verbose log is for FTP commands and responses.
By default, logs were written to syslog instead of file.
Use command: tail -f /var/log/vsftpd.log
Use command: logread -f
log_ftp_protocol=YES
vsftpd_log_file=/var/log/vsftpd.log
syslog_enable=NO
Allow log 1 and 2 to be written simultaneously.
dual_log_enable=YES
Once modified at your discretion, you must do a: service vsftpd restart
Due to the amount of logging generated, you might want to disable it as soon as you are finished debugging. More specifically, reverting to syslog_enable=YES will move back to logging into RAM ringbuffer in OpenWrt and avoid wear out flash.
- 171
Sometimes it happens that the log is not filling any data, because the file doesn't exist. Create a log file:
touch /var/log/vsftpd.log
Then
service vsftpd restart
- 2,445
- 21