I cannot run proftpd and sftp on directadmin server

saeednajafipour

Verified User
Joined
Aug 28, 2021
Messages
5
Hi there
I want to run proftpd on directadmin. I installed it using this post:
After the installation process I checked the following commands and got the related results:

"systemctl status proftpd" -->

● proftpd.service - ProFTPD FTP Server
Loaded: loaded (/etc/systemd/system/proftpd.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Sun 2021-10-03 02:29:51 EDT; 2min 25s ago
Process: 374683 ExecStart=/usr/sbin/proftpd $PROFTPD_OPTIONS (code=exited, status=0/SUCCESS)
Process: 374682 ExecStartPre=/usr/bin/mkdir -p /var/run/proftpd (code=exited, status=0/SUCCESS)
Main PID: 374684 (code=exited, status=0/SUCCESS)

Oct 03 02:29:51 da5.padidar.com systemd[1]: Starting ProFTPD FTP Server...
Oct 03 02:29:51 da5.padidar.com proftpd[374683]: 2021-10-03 02:29:51,076 da5.padidar.com proftpd[374683]: fatal: SFTPHostKey: unable to check '/etc/ssh/ssh_host_rsa_key': Permission denied>
Oct 03 02:29:51 da5.padidar.com proftpd[374683]: 2021-10-03 02:29:51,076 da5.padidar.com proftpd[374683]: warning: unable to include '/etc/proftpd.sftp.conf': Operation not permitted
Oct 03 02:29:51 da5.padidar.com proftpd[374683]: 2021-10-03 02:29:51,536 da5.padidar.com proftpd[374683] 5.159.55.124: mod_sftp/1.0.1: Server 'ProFTPd': ListOptions directive is not suppor>
Oct 03 02:29:51 da5.padidar.com proftpd[374684]: 5.159.55.124 - error opening scoreboard: Permission denied
Oct 03 02:29:51 da5.padidar.com systemd[1]: Started ProFTPD FTP Server.
Oct 03 02:29:51 da5.padidar.com systemd[1]: proftpd.service: Succeeded.

"telnet localhost 21" -->

Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 ProFTPD Server ready.
telnet localhost 21

"telnet localhost 22" -->
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

"telnet localhost 23" -->
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

"netstat -tulpn" -->
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 41994/exim
tcp 0 0 0.0.0.0:47470 0.0.0.0:* LISTEN 258460/checkstatus
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 1022/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 1022/dovecot
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 41994/exim
tcp 0 0 5.159.55.125:53 0.0.0.0:* LISTEN 7147/named
tcp 0 0 5.159.55.124:53 0.0.0.0:* LISTEN 7147/named
tcp 0 0 192.168.160.10:53 0.0.0.0:* LISTEN 7147/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 7147/named
tcp 0 0 0.0.0.0:121 0.0.0.0:* LISTEN 374676/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 41994/exim
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 7147/named
tcp 0 0 0.0.0.0:4190 0.0.0.0:* LISTEN 1022/dovecot
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 1022/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 1022/dovecot
tcp6 0 0 :::3306 :::* LISTEN 1088/mysqld
tcp6 0 0 :::587 :::* LISTEN 41994/exim
tcp6 0 0 :::2222 :::* LISTEN 258346/.directadmin
tcp6 0 0 :::110 :::* LISTEN 1022/dovecot
tcp6 0 0 :::143 :::* LISTEN 1022/dovecot
tcp6 0 0 :::80 :::* LISTEN 1365/httpd
tcp6 0 0 :::465 :::* LISTEN 41994/exim
tcp6 0 0 :::21 :::* LISTEN 12859/proftpd: (acc
tcp6 0 0 :::53 :::* LISTEN 7147/named
tcp6 0 0 :::23 :::* LISTEN 12859/proftpd: (acc
tcp6 0 0 :::121 :::* LISTEN 374676/sshd
tcp6 0 0 :::25 :::* LISTEN 41994/exim
tcp6 0 0 ::1:953 :::* LISTEN 7147/named
tcp6 0 0 :::443 :::* LISTEN 1365/httpd
tcp6 0 0 :::4190 :::* LISTEN 1022/dovecot
tcp6 0 0 :::993 :::* LISTEN 1022/dovecot
tcp6 0 0 :::995 :::* LISTEN 1022/dovecot
udp 0 0 5.159.55.125:53 0.0.0.0:* 7147/named
udp 0 0 5.159.55.124:53 0.0.0.0:* 7147/named
udp 0 0 192.168.160.10:53 0.0.0.0:* 7147/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 7147/named
udp 0 0 127.0.0.1:323 0.0.0.0:* 975/chronyd
udp6 0 0 :::53 :::* 7147/named
udp6 0 0 ::1:323 :::* 975/chronyd

What is scoreboard? (error opening scoreboard: Permission denied)
What should I do to be able to sftp to this server using filezilla?
Thanks in advnace
 
Hi again
We can also see the following:

"nano /etc/proftpd.sftp.conf" -->

<IfModule mod_sftp.c>
<VirtualHost 0.0.0.0>
# The SFTP configuration
Port 23

AuthUserFile /etc/proftpd.passwd
TransferLog /var/log/proftpd/xferlog.legacy
ExtendedLog /var/log/proftpd/5.159.55.124.bytes WRITE,READ userlog

SFTPEngine on

SFTPLog /var/log/proftpd/sftp.log
SFTPHostKey /etc/ssh/ssh_host_rsa_key
SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys

SFTPClientMatch ".*WS_FTP.*" channelWindowSize 1GB #WS_FTP initial window size
SFTPClientMatch ".*ClientSftp" sftpProtocolVersion 3 #CuteFTPPro8
SFTPClientMatch ".*WinSCP.*" sftpProtocolVersion 3 #upload/download fix for WinSCP
SFTPClientMatch ".*SecureBlackbox.*" sftpProtocolVersion 3
SFTPClientMatch "1.0" sftpProtocolVersion 3 channelWindowSize 1GB
SFTPClientMatch ".*J2SSH_Maverick.*" channelWindowSize 1GB
SFTPClientMatch ".*WeOnlyDo.*" sftpProtocolVersion 3 channelWindowSize 1GB
SFTPClientMatch ".*EldoS.SSHBlackbox.3.*" sftpProtocolVersion 3 channelWindowSize 1GB
SFTPClientMatch ".*IP.Works.*" channelWindowSize 1GB
</VirtualHost>
</IfModule>








"nano /etc/ssh/ssh_host_rsa_key" -->

includes the rsa key










"nano /etc/proftpd.conf" -->

ServerName "ProFTPd"
ServerType standalone

Port 0
<VirtualHost 0.0.0.0>
Port 21
AuthUserFile /etc/proftpd.passwd
</VirtualHost>

PassivePorts 35000 35999
UseReverseDNS off
TimesGMT off
TimeoutLogin 120
TimeoutIdle 600
TimeoutNoTransfer 900
TimeoutStalled 3600

ScoreboardFile /var/run/proftpd/proftpd.scoreboard
PidFile /var/run/proftpd/proftpd.pid

TransferLog /var/log/proftpd/xferlog.legacy
LogFormat default "%h %l %u %t \"%r\" %s %b"
LogFormat auth "%v [%P] %h %t \"%r\" %s"
LogFormat write "%h %l %u %t \"%r\" %s %b"

#DON'T modify this log format. Its used by DirectAdmin to determine user usage
LogFormat userlog "%u %b %m %a"
ExtendedLog /var/log/proftpd/|SERVER_IP|.bytes WRITE,READ userlog

AuthUserFile /etc/proftpd.passwd
DefaultServer on
AuthOrder mod_auth_file.c

#AuthPAM off

<IfModule mod_tls.c>
TLSEngine on
TLSLog /var/log/proftpd/proftpd.tls.log
TLSProtocol ALL -TLSv1 -TLSv1.1
TLSCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
TLSVerifyClient off
TLSRequired off

#Certificates
TLSRSACertificateFile /etc/exim.cert
TLSRSACertificateKeyFile /etc/exim.key
#TLSCACertificateFile /etc/ftpd/root.cert.pem

TLSCipherSuite HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
</IfModule>

<Global>
PassivePorts 35000 35999
DeferWelcome on

RequireValidShell no

DefaultRoot ~
DirFakeUser on ftp
DirFakeGroup on ftp

User ftp
Group ftp
#UserAlias anonymous ftp

AllowStoreRestart on
AllowRetrieveRestart on

ListOptions -a

Umask 022
DisplayLogin welcome.msg
DisplayChdir readme
AllowOverwrite yes
ExtendedLog /var/log/proftpd/access.log WRITE,READ write
ExtendedLog /var/log/proftpd/auth.log AUTH auth

#
# Paranoia logging level....
#
#ExtendedLog /var/log/proftpd/paranoid.log ALL default

<IfModule mod_tls.c>
TLSEngine on
TLSLog /var/log/proftpd/proftpd.tls.log
TLSRSACertificateFile /etc/exim.cert
TLSRSACertificateKeyFile /etc/exim.key
</IfModule>
</Global>


Include /etc/proftpd.sftp.conf



I can connect to directadmin file manager using ftp although proftpd service is inactive. but I cannot use sftp to connect to the server. what should I do?
 
Last edited:
I assume since you are listening for sftp on port 23 that you told your sftp client to use port 23 instead of the default 22?
 
Back
Top