Howto log multiple sftpd instances with their chroot shared via NFS

Hildegard Meier daku8938 at
Wed Sep 29 18:42:46 AEST 2021

Hi, I tried now the following:

Add the following line to /etc/fstab:

/var/data/chroot                            /usr/local/sftp_chroot_bind_mount   none    bind                0       2

mkdir /usr/local/sftp_chroot_bind_mount
mount /usr/local/sftp_chroot_bind_mount

to bind-mount the users's chroot home to /usr/local/sftp_chroot_bind_mount

Then replace in the syslog-ng config:

source s_chroot_<username>    { unix-stream("/var/data/chroot/<username>/dev/log" optional(yes) ); };
source s_chroot_<username>    { unix-stream("/usr/local/sftp_chroot_bind_mount/<username>/dev/log" optional(yes) ); };

Restart syslog-ng

That would have been such a simple workaround.
But unfortunately, the problem is not solved with this.
The problem is the same, that there is sftp logging only on the sftp server where syslog-ng was restarted least.

More information about the openssh-unix-dev mailing list