Diese Seite (Version-24) wurde zuletzt am 21-März-2023 18:36 von Administrator geändert.

Diese Seite wurde am 28-März-2017 14:37 von Administrator erstellt.

Du bist nicht autorisiert, diese Seite umzubenennen.

Du bist nicht autorisiert, diese Seite zu löschen.

Versionsgeschichte der Seite

Version Zuletzt geändert Größe Autor Änderungen Kommentar
24 21-März-2023 18:36 4 KB Administrator zur vorherigen
23 21-März-2023 18:35 4 KB Administrator zur vorherigen | zur neuesten
22 21-März-2023 18:34 4 KB Administrator zur vorherigen | zur neuesten
21 21-März-2023 18:32 4 KB Administrator zur vorherigen | zur neuesten

Links

Eingehende Links Ausgehende Links

Versionsunterschiede

Unterschiede zwischen Version und .

Zeile 10: 4 Zeilen geändert.
proftpd -v # get version
ps -ef|grep proftpd # check running / pid
dpkg -l '*proftp*' # check package installed
apt list --installed | less # check packages installed
proftpd -v
ps -ef|grep proftp
dpkg -l '*proftp*'
apt list --installed | less
Zeile 19: Eine Zeile hinzugefügt.
}}}
Zeile 20: 10 Zeilen geändert.
service proftpd status # check ProFTPD running
netstat -tlp|grep proftp # ProFTPD lauscht auf Port 21
telnet 192.0.2.10 21 # Verbindungstest auf Port 21 mit telnet
openssl s_client -connect 192.0.2.10:21 -starttls ftp # Verbindungstest auf Port 21 mit TLS
proftpd -d 5 # ? increase debug, 0-10, 10 = most debugging
vi /var/log/proftpd/proftpd.log
vi /var/log/proftpd/tls.log
vi /var/log/proftpd/sftp.log
vi /var/log/proftpd/xferlog
! Analysis
{{{
$ service proftpd status # ProFTPD Dienst läuft
$ netstat -tlp|grep proftp # ProFTPD lauscht auf Port 21
$ tail -20 /var/log/proftpd/proftpd.log # Fehlermeldungen im ProFTPD Log
$ tail -20 /var/log/proftpd/tls.log # Fehlermeldungen im ProFTPD TLS Log
$ telnet 192.0.2.10 21 # Verbindungstest auf Port 21 mit telnet
$ openssl s_client -connect 192.0.2.10:21 -starttls ftp # Verbindungstest auf Port 21 mit TLS
Zeile 40: Eine Zeile geändert.
Standard configuration is
Main one:
Zeile 42: 3 Zeilen geändert.
vi /etc/proftpd/proftpd.conf # main one
vi /etc/proftpd/conf.d/tls.conf # tls
vi /etc/proftpd/conf.d/sftp.conf # sftp (not used, but see below)
/etc/proftpd/proftpd.conf
Zeile 46: Eine Zeile geändert.
The main one includes ALL files from folder conf.d. We create our own one
This has
Zeile 45: 4 Zeilen hinzugefügt.
Include /etc/proftpd/conf.d/
}}}
We create a custom one in that subfolder
{{{
Zeile 69: 2 Zeilen gelöscht.
We use TLS, NOT SFTP, nevertheless check sftp.conf:
Zeile 73: 6 Zeilen gelöscht.
SFTPEngine off " is it off? (ok)
Port 2222 " port overridden ?
}}}
{{{
$ vi /etc/proftpd/conf.d/tls.conf
Zeile 86: Eine Zeile hinzugefügt.
Zeile 110: 4 Zeilen gelöscht.
!SFTP Client
I use [filezilla 64bit without setup|https://filezilla-project.org/download.php?show_all=1]
Use "Explizites FTP über TLS erfordern"
Zeile 117: 2 Zeilen geändert.
! Log Settings
You may adopt in proftpd.conf:
Add to /etc/proftpd/proftpd.conf
Zeile 109: 44 Zeilen hinzugefügt.
DefaultRoot ~
AuthOrder mod_auth_file.c mod_auth_unix.c
AuthUserFile /etc/proftpd/ftpd.passwd
AuthPAM off
RequireValidShell off
}}}
Restart
{{{
sudo /etc/init.d/proftpd restart
}}}
/var/run/proftpd/proftpd.delay
If you get
{{{
2016-10-20 23:00:25,427 v22013121954216166.yourvserver.net proftpd[2368]: mod_auth_file/1.0: unable to use world-readable AuthUserFile '/etc/proftpd/ftpd.passwd': Operation not permitted
2016-10-20 23:00:25,427 v22013121954216166.yourvserver.net proftpd[2368]: Fatal: AuthUserFile: unable to use /etc/proftpd/ftpd.passwd: Operation not permitted on line 91 of '/etc/proftpd/proftpd.conf'
}}}
then read [https://ubuntuforums.org/showthread.php?t=2238794]
{{{
sudo chmod o-rwx /etc/proftpd/ftpd.passwd
}}}
Old (not necessary): Edit /etc/hosts.deny and /etc/hosts.allow
{{{
ftpd: ALL
}}}
Old: Start
{{{/markus/proftpd/proftpd-1.3.3f/proftpd -c /usr/local/etc/proftpd.conf
}}}
Old: Stop
{{{
netstat -pant
kill -9 <pid>
}}}
! Logging
Add in proftpd.conf:
{{{
Zeile 164: 6 Zeilen hinzugefügt.
Increase debug level by starting with -d:
{{{
proftpd -d 5
}}}
-d level\\
Set debugging level (0-10, 10 = most debugging)
Zeile 171: 31 Zeilen hinzugefügt.
!Use SFTP
In {{{/etc/proftpd/proftpd.conf}}} you generally {{{Include /etc/proftpd/conf.d/}}}\\
Disable tls
{{{
vi /etc/proftpd/conf.d/tls.conf
TLSEngine off
}}}
Create sftp config
{{{
vi /etc/proftpd/conf.d/sftp.conf
<IfModule mod_sftp.c>
SFTPEngine on
Port 2222
SFTPLog /var/log/proftpd/sftp.log
# Configure both the RSA and DSA host keys, using the same host key
# files that OpenSSH uses.
SFTPHostKey /etc/ssh/ssh_host_rsa_key
SFTPHostKey /etc/ssh/ssh_host_dsa_key
#SFTPAuthMethods publickey
SFTPAuthMethods password
#SFTPAuthorizedUserKeys file:/etc/proftpd/authorized_keys/%u
#AuthOrder mod_auth_file.c
# Enable compression
SFTPCompression delayed
</IfModule>