Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging for specific users does not work #1705

Open
networkoper opened this issue Aug 27, 2023 · 2 comments
Open

Logging for specific users does not work #1705

networkoper opened this issue Aug 27, 2023 · 2 comments
Assignees

Comments

@networkoper
Copy link

ProFTPD Version 1.3.8 / Debian 12

I configure logging for a specific user, but logging does not happen. I don't get any errors, here is the configuration of my settings:

<IfModule mod_dso.c>
    RequireValidShell off
    AuthUserFile /etc/proftpd/ftpd.passwd
    AuthGroupFile /etc/proftpd/ftpd.group
    AuthOrder mod_auth_file.c
    LoadModule mod_ifsession.c
</IfModule>

Logformat userlog "%{iso8601} %a %u %s \%r %d"

<IfModule mod_ifsession.c>
  <IfUser userBOB>
    ExtendedLog /var/log/proftpd/userBOB.log READ,WRITE,INFO,EXIT userlog
  </IfUser>
</IfModule>
@Castaglia
Copy link
Member

ProFTPD is not well suited for generating per-user log files.

The issue is that any configured log file is opened very early in the session lifecycle, before privileges are dropped and before any DefaultRoot/chroot occurs. Privileges are dropped, and chroots happen, as part of the authentication process -- which is precisely when we learn the identity of the remote user.

Log files cannot be easily opened after authentication, due to lack of permissions in many cases, and due to inaccessibility of the configured log path once a chroot occurs.

Obtaining per-user log files from ProFTPD logging is best done by post-processing the log files generated by ProFTPD, and not by having ProFTPD itself support per-user logging.

@Castaglia
Copy link
Member

If there's nothing more to add to this ticket, I'd like to close it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants