Find the answer to your Linux question:
Results 1 to 5 of 5
Hi all, Quite a simple question but may turn into life saver: how to log connect/disconnect events as well as upload, download, delete, rename etc.? /var/log/xferlog remains empty, while /var/log/vsftpd.log ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    3

    vsftpd logging


    Hi all,

    Quite a simple question but may turn into life saver: how to log connect/disconnect events as well as upload, download, delete, rename etc.?

    /var/log/xferlog remains empty, while /var/log/vsftpd.log never gets created.
    What's wrong?


  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Without knowing too much about your problem, I can tell you that syslogd will not create a logfile for you. To get it started you may need to:

    # touch /var/log/vsftpd.log

    Confirm that it has the ownership/permissions you require.

    Your vsftpd configuration should also be pointing to that logfile...

    After doing that, reload your syslogd server or reboot your box.

  3. #3
    Just Joined!
    Join Date
    Sep 2007
    Posts
    3
    1. Ok, I touch-ed it. No change.

    2. Here are the permissions:
    -rw-r--r-- 1 root root 2 Sep 22 16:17 vsftpd.log
    (Of course it is in /var/log/).

    3. The logging options are as follows:

    dual_log_enable=NO (default)
    log_ftp_protocol=YES
    syslog_enable=NO (default)
    vsftpd_log_file=/var/log/vsftpd.log (default)
    xferlog_enable=NO (default)
    xferlog_file=/var/log/xferlog (default)
    xferlog_std_format=NO (default)

    The default settings´ values are not explicitly set in vsftpd.conf. Only the following two lines are present:

    syslog_enable=NO
    log_ftp_protocol=YES

    4. I restarted openSUSE - still no change - the file is empty.

    The only directive explicitly specified is syslog_enable because it comes from an example I used to configure vsftpd. I also noticed that in man pages syslog_enable is explained as follows:

    If enabled, then any log output which would have gone to /var/log/vsftpd.log goes to the system log instead. Logging is done under the FTPD facility.
    Default: NO

    This imples that the log output by default goes to /var/log/vsftpd.log but if the directive is set to YES it goes to system log. This means that logging is done anyway. But how?

    My log file contains nothing - it is empty!

  4. #4
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Well, I just read through the vsftpd.conf manpage.

    If I wanted to enabled a lot of logging (and pare it down from there), I'd probably set:
    Code:
    dual_log_enable=YES
    log_ftp_protocol=YES
    xferlog_enable=YES
    syslog_enable=NO
    I haven't tested this (and I don't have time at the moment to install vsftpd to do so).

    After doing that, reload/restart the vsftpd service.

    If logging is still not working correctly, you will need to check the ownership/permissions of your log file. Since you won't be using the syslogd facility, the /var/log/xferlog and /var/log/vsftpd.log files should be owned by the same user that vsftpd runs as.

    If you don't know how to determine that, post the results of:
    ps -ef | grep vsftpd

  5. #5
    Just Joined!
    Join Date
    Sep 2007
    Posts
    3
    xferlog_enable=YES enables logging. 10x alot!
    What really makes me feel uncomfortable with all these is that strictly following manpages is not only insufficient but also IMHO somewhat misleading!!
    So, obviously, configuring something (whatever - I have some experience with Apache and Mono) includes two distinct steps: reading man pages, playing with settings until satisfactory results are achieved.
    In my case, xferlog file is still empty (it has to be enabled I guess - take a look at the names!) but I don't really care - vsftpd.log is enough for me.
    Again, 10x alot!
    Show goes on...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •