| 1 |
ProFTPD Server for Debian |
| 2 |
------------------------- |
| 3 |
|
| 4 |
** Debian is different |
| 5 |
|
| 6 |
Current maintainers of proftpd on Debian have the questionable |
| 7 |
habit to integrate many cvs-stolen intermediate patches to the official |
| 8 |
proftpd release, to fix known issues and provide preview features. |
| 9 |
The result is that the released program can be quite far from the |
| 10 |
original tarball, so do not bother upstream team with bug reporting |
| 11 |
about Debian proftpd, without pre-check with the maintainer. At the same |
| 12 |
time, do not desume that some known specific problems are not fixed on |
| 13 |
the basis of the declared upstream version: that could be not true. |
| 14 |
Read the maintainer changelog before reporting. |
| 15 |
|
| 16 |
** Different authorization layers |
| 17 |
|
| 18 |
The most exotic authorization and add-on layers (based on MySQL, |
| 19 |
PostgreSQL, LDAP, etc.) are split in different independent packages, |
| 20 |
named proftpd-mod-* and you need to install the required add-on package |
| 21 |
in order to use those types of authentication modes with the proftpd-basic |
| 22 |
package, where all other main modules live. See also Dynamic Modules in |
| 23 |
this document below. |
| 24 |
|
| 25 |
In order to use those modules you have to decomment |
| 26 |
the appropriate lines in /etc/proftpd/modules.conf and include that file |
| 27 |
from /etc/proftpd/proftpd.conf, as shown in basic templates stored in |
| 28 |
the /usr/share/proftpd/templates directory. Note that there are |
| 29 |
some implicit inter-dependencies in shared modules and the order used |
| 30 |
in /etc/proftpd/proftpd.conf is NOT casual. If you got some weird |
| 31 |
segfaults at run-time, you are probably using a wrong configuration: |
| 32 |
consider that currently proftpd is quite weak in managing DSO anomalies, |
| 33 |
so be careful. |
| 34 |
|
| 35 |
** IPv6 issue: |
| 36 |
|
| 37 |
In standalone mode proftpd binds both IPv4 and IPv6 addresses. That |
| 38 |
causes a quite annoying message at startup on IPv4-only boxes, such as: |
| 39 |
|
| 40 |
IPv6 getaddrinfo 'your_host_name' error: Name or service not known |
| 41 |
|
| 42 |
That can be avoided by keeping an IPv6 mapping for your_host_name in your /etc/hosts file, such as: |
| 43 |
|
| 44 |
::1 ip6-localhost ip6-loopback your_host_name |
| 45 |
|
| 46 |
or also |
| 47 |
|
| 48 |
::fff:A.B.C.D your_host_name |
| 49 |
|
| 50 |
when you got a static IPv4 address A.B.C.D. The same is required for all IP4/6 addresses, just |
| 51 |
in case your nameserver does not map your hostname and IPs. |
| 52 |
|
| 53 |
Debian proftpd since 1.3.0-14 is also patched to disable IPv6 at run-time using the |
| 54 |
|
| 55 |
UseIPv6 off |
| 56 |
|
| 57 |
directive in /etc/proftpd/proftpd.conf file or using the following options: |
| 58 |
|
| 59 |
-4, --ipv4 Support IPv4 functionality only |
| 60 |
-6, --ipv6 Support IPv6 functionality |
| 61 |
|
| 62 |
Starting from 1.3.2, upstream default has become having IPv6 off, but Debian has still |
| 63 |
it on by default to be consistent with the past. |
| 64 |
|
| 65 |
** Dynamic modules |
| 66 |
|
| 67 |
Starting from 1.3.0 version proftpd supports DSO modules, which are loaded at run time |
| 68 |
consulting the Debian-specific /etc/proftpd/modules.conf file, which must be included |
| 69 |
in your /etc/proftpd/proftpd.conf configuration file. |
| 70 |
|
| 71 |
Note that in case of SQL modules you need to comment out the unused back-end module |
| 72 |
(e.g. mod_sql_mysql if you use mod_sql_postgres or viceversa) in order to have the right |
| 73 |
authentication module working, or to change the auth order in your config file. |
| 74 |
Alternatively, you should use the explicit 'SQLBackend' directive, as shown in the default |
| 75 |
configuration file. Note that the SQL auth layer requires that both mod_sql.c _and one_ |
| 76 |
specific backend (e.g. mod_sql_mysql.c) are loaded in that order to work correctly. |
| 77 |
|
| 78 |
As always, your old proftpd.conf is NOT ensured to work smoothly with the current release: |
| 79 |
that can be due to changes in directives and defaults for core or contributed modules. |
| 80 |
You are strongly advised to consult documentation in order to upgrade your existent |
| 81 |
configuration. |
| 82 |
|
| 83 |
** IPv6 and CIDR notation considerations: |
| 84 |
|
| 85 |
Keep attention to the use of CIDR notation in Allow/Deny directives with IPv6 address space! |
| 86 |
A naive approach would be writing something like: |
| 87 |
|
| 88 |
Allow ::ffff:A.B.C.D/24 |
| 89 |
Deny all |
| 90 |
|
| 91 |
to allow your own IPv4 subnet and deny all the rest. |
| 92 |
That's definitively WRONG! IPv6 CIDR are considered on a 128 bits range, therefore that directive |
| 93 |
would allow access to the whole IPv4 address space instead! So a proper directive in that |
| 94 |
case is |
| 95 |
|
| 96 |
Allow ::ffff:A.B.C.D/120 |
| 97 |
Deny all |
| 98 |
|
| 99 |
** Running proftpd in non standalone configuration |
| 100 |
|
| 101 |
It is strongly preferred using proftpd as a daemon for any serious |
| 102 |
use. In some cases, the admin could be interested in using one of the |
| 103 |
superservers (inetd/xinetd) or systemd socket to run proftpd instances. |
| 104 |
|
| 105 |
That could be done by running |
| 106 |
|
| 107 |
systemctl disable --now proftpd.service |
| 108 |
|
| 109 |
then changing from 'standalone' to 'inetd' the ServerType entry in |
| 110 |
/etc/proftpd/proftpd.conf, and: |
| 111 |
|
| 112 |
- enabling the service in /etc/inetd.conf by running |
| 113 |
|
| 114 |
update-inetd --enable proftpd |
| 115 |
|
| 116 |
- or adding the proper xinetd snippet under /etc/xinet.d. For example: |
| 117 |
|
| 118 |
add /etc/xinet.d/proftpd: |
| 119 |
service ftp |
| 120 |
{ |
| 121 |
disable = no |
| 122 |
type = INTERNAL |
| 123 |
socket_type = stream |
| 124 |
protocol = tcp |
| 125 |
user = root |
| 126 |
wait = no |
| 127 |
server = /usr/sbin/proftpd |
| 128 |
} |
| 129 |
and restart xinetd. |
| 130 |
|
| 131 |
- or using systemd support for socket. To do that run: |
| 132 |
|
| 133 |
systemctl enable --now proftpd.socket |
| 134 |
|
| 135 |
** Other information |
| 136 |
|
| 137 |
Please, read accurately the NEWS, README and changelog file in /usr/share/doc/proftpd-basic |
| 138 |
to find novelties of this version if you are upgrading from a pre-1.3.1 release. |
| 139 |
It is also extremely useful installing the proftpd-doc package for additional information |
| 140 |
and HOWTOs. Read specifically documentation about the now mandatory AuthOrder specification |
| 141 |
for all 'exotic' authorization engines. That is specifically important before reporting |
| 142 |
bugs. If after that you still thought to have found a bug, please follow the mini-howto |
| 143 |
|
| 144 |
http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-Debugging.html |
| 145 |
|
| 146 |
to report properly all required information. Without that, your report is very unlikely |
| 147 |
to be considered by both maintainer and upstreams. Also, do not presume soon to have |
| 148 |
found a bug, please think twice before reporting on the Debian BTS, thanks. |
| 149 |
|
| 150 |
If you were more inclined you can try to contact on-line the maintainer or the |
| 151 |
ProFTPD team in the #proftpd channel on irc.freenode.net. |
| 152 |
|