Hi there,
well i was tired to wait on a true FTP server included on Synology firmware.
Then i chose to install Pro-ftpd.
First, don't forget to stop default Synology FTP.
[NAS]: ps -fe | grep -i ftpd
[NAS]: killall ftpd
Installation :
[NAS]:ipkg list | grep -i proftpd
proftpd - 1.3.1-3 - Highly configurable FTP server with SSL-TLS
[NAS]:ipkg install proftpd
Proftpd is installed under /opt/
Configuration :
You have to edit proftpd.conf under /opt/etc.
Here is a dummy file to understand how to configure (directives as Apache).
Each user connects to the default root (DefaultRoot) where i have incoming et pub directories.
Then i lock some privileges with Limit.
----
ServerName NAS
ServerType inetd
DefaultServer on
ServerIdent on "NAS Server Ready"
DeferWelcome on
MaxLoginAttempts 3
AccessGrantMsg "Bienvenue %u ..."
AuthGroupFile /etc/ftpgroup
AuthUserFile /etc/ftppasswd
Port 21
PassivePorts xxxxx xxxxx
MasqueradeAddress xxx.xxx.xxx.xxx
Umask 000
TimesGMT off
UseReverseDNS off
IdentLookups off
MaxInstances 100
User nobody
Group nobody
RootLogin off
DefaultRoot /volume1/xchange/ftp
DefaultTransferMode binary
TimeoutIdle 900
TimeoutLogin 120
AllowStoreRestart on
AllowRetrieveRestart on
AllowOverwrite on
SocketOptions rcvBuf 131070
SocketOptions sndBuf 131070
<Limit SITE_CHMOD>
DenyAll
</Limit>
<Directory /volume1/xchange/ftp>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
<Directory /volume1/xchange/ftp/incoming>
<Limit WRITE>
AllowAll
</Limit>
<Limit DELE RMD>
DenyAll
</Limit>
</Directory>
<Directory /volume1/xchange/ftp/pub>
<Limit ALL>
AllowAll
</Limit>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
---
I chose inetd for ServerType because i prefer to use tcpwraper.
I can then configure hosts.deny and hosts.allow to filter.
It is possible to use directive directory to filter IP @ but proftpd.conf should be updated every time i decided to restrict access.
inetd.conf :
telnet stream tcp nowait root /usr/sbin/telnetd telnetd
ftp stream tcp nowait root /opt/libexec/tcpd /opt/sbin/proftpd --config /opt/etc/proftpd.conf
After modifying inetd.conf you need to restart service (/usr/syno/etc/rc.d).
ServerType could be set to standalone as well , but you have to start daemon with this script :
#!/bin/sh
#
# Startup script for proftpd as standalone server
#
if [ -n "`pidof proftpd`" ]; then
/bin/killall proftpd 2>/dev/null
fi
/opt/sbin/proftpd --config /opt/etc/proftpd.conf
PassivePorts xxxxx xxxxx
MasqueradeAddress xxx.xxx.xxx.xxx
It is used for passive FTP and NAT.
You can put IP @ or domain name for MasqueradeAddress.
AuthGroupFile /etc/ftpgroup
AuthUserFile /etc/ftppasswd
It is used to create virtual users.
Like this, the users allowed to ftp have no account on the system.
I use ftpasswd on Solaris to generate this two files (ftpasswd is not included on ipkg distrib).
ServerIdent and DeferWelcome
These parameters are for security reason.
FTP server is not responding with informations about release.
It is more difficult to find back door if the release and the version is not known.
Here is a very good site for directives to configure ProFTP :
http://www.castaglia.org/proftpd/
Now i've a real FTP server with logs, statistics etc ... Not the toy released by Synology.



