• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Log chroot SFTP file transfers

mserra_manxa

New Pleskian
Server operating system version
Ubuntu 20.04.6 LTS
Plesk version and microupdate number
Version 18.0.59 Update #2
Hi, I'm trying to log SFTP file transfers for a chrooted users.

My /etc/ssh/sshd_config:
Code:
# override default of no subsystems
# Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp /usr/lib/openssh/sftp-server -f LOCAL7 -l INFO
##### I tried other options, but not works...
#Subsystem sftp /usr/lib/openssh/sftp-server -l INFO
#Subsystem sftp /usr/lib/openssh/sftp-server -f AUTH -l INFO

##### I tried for a specific user override, but not works ...
#Match User mydomain
#       ForceCommand internal-sftp -f LOCAL7 -l INFO

My /etc/rsyslog.d/60-sftp.conf:
Code:
$AddUnixListenSocket /var/www/vhosts/mydomain/dev/log

# Parse the data logged at level INFO and facility LOCAL7 into /var/log/sftp.log
LOCAL7.* /var/log/sftp.log

# Report logins and logoffs
:syslogtag,startswith,"sftp-server" /var/log/sftp.log

Restarted services...
Code:
service ssh restart; service rsyslog restart

I have a log socket in /var/www/vhosts/mydomain/dev/:
Code:
srw-rw-rw- 1 root root    0 Apr  8 12:49 log

But both files (/var/log/sftp.log and /var/www/vhosts/mydomain/dev/log) are empty

What I'm missing?
 
Well, seems my config works (in part). The SFTP file transfers are logged, but on /var/log/syslog, not in /var/log/sftp.log.

I don't know why, but by now it's ok for me.
 
Back
Top