<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.qnap.com/mediawiki/index.php?title=Proftpd_with_Openssl_and_virtual_users&amp;feed=atom&amp;action=history</id>
	<title>Proftpd with Openssl and virtual users - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.qnap.com/mediawiki/index.php?title=Proftpd_with_Openssl_and_virtual_users&amp;feed=atom&amp;action=history"/>
	<link rel="alternate" type="text/html" href="https://wiki.qnap.com/mediawiki/index.php?title=Proftpd_with_Openssl_and_virtual_users&amp;action=history"/>
	<updated>2022-08-31T20:38:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://wiki.qnap.com/mediawiki/index.php?title=Proftpd_with_Openssl_and_virtual_users&amp;diff=975&amp;oldid=prev</id>
		<title>Glenn: catchg</title>
		<link rel="alternate" type="text/html" href="https://wiki.qnap.com/mediawiki/index.php?title=Proftpd_with_Openssl_and_virtual_users&amp;diff=975&amp;oldid=prev"/>
		<updated>2015-10-26T10:26:52Z</updated>

		<summary type="html">&lt;p&gt;catchg&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:26, 26 October 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l451&quot; &gt;Line 451:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 451:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Communications]] [[Category:FTP_Server]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[Category:Installation_and_Setup]] [[Category:Miscellaneous]] &lt;/del&gt;[[Category:QPKG]] [[Category:Optware_IPKG]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Communications]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:FTP_Server]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:QPKG]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Optware_IPKG]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Glenn</name></author>
	</entry>
	<entry>
		<id>https://wiki.qnap.com/mediawiki/index.php?title=Proftpd_with_Openssl_and_virtual_users&amp;diff=355&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.qnap.com/mediawiki/index.php?title=Proftpd_with_Openssl_and_virtual_users&amp;diff=355&amp;oldid=prev"/>
		<updated>2015-06-22T00:58:48Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:58, 22 June 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.qnap.com/mediawiki/index.php?title=Proftpd_with_Openssl_and_virtual_users&amp;diff=354&amp;oldid=prev</id>
		<title>Raffe at 09:44, 20 April 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.qnap.com/mediawiki/index.php?title=Proftpd_with_Openssl_and_virtual_users&amp;diff=354&amp;oldid=prev"/>
		<updated>2013-04-20T09:44:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;For detailed info, look here&amp;amp;nbsp;[http://forum.qnap.com/viewtopic.php?f=90&amp;amp;t=3499&amp;amp;p=16283 http://forum.qnap.com/viewtopic.php?f=90&amp;amp;amp;t=3499&amp;amp;amp;p=16283] and here [http://forum.qnap.com/viewtopic.php?f=90&amp;amp;t=2851&amp;amp;p=16280 viewtopic.php?f=90&amp;amp;amp;t=2851&amp;amp;amp;p=16280] &lt;br /&gt;
&lt;br /&gt;
This is how I did it... &lt;br /&gt;
&lt;br /&gt;
= First install Optware/ IPKG&amp;lt;br&amp;gt;  =&lt;br /&gt;
&lt;br /&gt;
You need Optware/IPKG&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
#a. Go to administration web login and go to Applications - QPKG Center and install Optware, also read [http://wiki.qnap.com/wiki/Install_Optware_IPKG http://wiki.qnap.com/wiki/Install_Optware_IPKG] &lt;br /&gt;
#b. Don't forget to enable Optware in administration web login - Applications - QPKG Center (click 'Enable' ) after installation and then restart the NAS. If you have not restarted, you need at least to do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;PATH=$PATH:/opt/bin:/opt/sbin&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
= Installing stuff  =&lt;br /&gt;
&lt;br /&gt;
First I go to a temp folder (so the littering files stays here) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mkdir /opt/temp&amp;lt;br&amp;gt; cd /opt/temp &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Install (to install perl, you can also do like this http://wiki.qnap.com/wiki/Perl_5.8.8_Installation ) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/opt/bin/ipkg update&amp;lt;br&amp;gt; /opt/bin/ipkg install proftpd&amp;lt;br&amp;gt; /opt/bin/ipkg install perl &amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
= Get ftpasswd&amp;lt;br&amp;gt;  =&lt;br /&gt;
&lt;br /&gt;
From the source (I did this), find your favorite downloading/mirror site here&amp;amp;nbsp;http://www.proftpd.org/ or download from&amp;amp;nbsp;[ftp://ftp.proftpd.org/distrib/source/ ftp://ftp.proftpd.org/distrib/source/]&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd /opt/temp&amp;lt;br&amp;gt; wget ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.proftpd.net/devel/source/proftpd-cvs-20080226.tar.gz&amp;lt;br&amp;gt; tar xvfz proftpd-cvs-20080226.tar.gz&amp;lt;br&amp;gt; cp /opt/temp/proftpd-cvs-20080226/contrib/ftpasswd /opt/bin/&amp;lt;br&amp;gt; rm proftpd-cvs-20080226* -r&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Or maybe you prefer to get it from castaglia.org? I guess you could do like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd /opt/bin/&amp;lt;br&amp;gt; wget http://www.castaglia.org/proftpd/contrib/ftpasswd&amp;lt;br&amp;gt; chmod 700 ftpasswd&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;If you installed perl with ipkg, open ftpasswd and change it with (if you installed with http://wiki.qnap.com/wiki/Perl_5.8.8_Installation, you don't need to change it): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &amp;lt;code&amp;gt;vi /opt/bin/ftpasswd&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;From: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#!/usr/bin/perl&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;To: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#!/opt/bin/perl&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
= Make one virtual user to test with  =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;mkdir /home/proftpusers&amp;lt;br&amp;gt; mkdir /home/proftpusers/bob&amp;lt;br&amp;gt; cd /opt/etc/ftpd&amp;lt;br&amp;gt; /opt/bin/ftpasswd --passwd --name=bob --uid=1001 --home=/home/proftpusers/bob --shell=/bin/false&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
= Openssl  =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;mkdir /opt/etc/openssl&amp;lt;br&amp;gt; chmod 600 /opt/etc/openssl&amp;lt;br&amp;gt; cd /opt/etc/openssl&amp;lt;br&amp;gt; touch sign.sh&amp;lt;br&amp;gt; vi sign.sh&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
I paste this into sign.sh:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
##&lt;br /&gt;
##  sign.sh -- Sign a SSL Certificate Request (CSR)&lt;br /&gt;
##  Copyright (c) 1998-2001 Ralf S. Engelschall, All Rights Reserved.&lt;br /&gt;
##&lt;br /&gt;
#   argument line handling&lt;br /&gt;
CSR=$1&lt;br /&gt;
if [ $# -ne 1 ]; then&lt;br /&gt;
    echo &amp;quot;Usage: sign.sign &amp;amp;lt;whatever&amp;amp;gt;.csr&amp;quot;; exit 1&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f $CSR ]; then&lt;br /&gt;
    echo &amp;quot;CSR not found: $CSR&amp;quot;; exit 1&lt;br /&gt;
fi&lt;br /&gt;
case $CSR in&lt;br /&gt;
   *.csr ) CERT=&amp;quot;`echo $CSR | sed -e 's/\.csr/.crt/'`&amp;quot; ;;&lt;br /&gt;
       * ) CERT=&amp;quot;$CSR.crt&amp;quot; ;;&lt;br /&gt;
esac&lt;br /&gt;
#   make sure environment exists&lt;br /&gt;
if [ ! -d ca.db.certs ]; then&lt;br /&gt;
    mkdir ca.db.certs&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f ca.db.serial ]; then&lt;br /&gt;
    echo '01' &amp;amp;gt;ca.db.serial&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f ca.db.index ]; then&lt;br /&gt;
    cp /dev/null ca.db.index&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
#   create an own SSLeay config&lt;br /&gt;
cat &amp;amp;gt; ca.config &amp;amp;lt;&amp;amp;lt;EOT&lt;br /&gt;
[ ca ]&lt;br /&gt;
default_ca              = CA_own&lt;br /&gt;
[ CA_own ]&lt;br /&gt;
dir                     = .&lt;br /&gt;
certs                   = \$dir&lt;br /&gt;
new_certs_dir           = \$dir/ca.db.certs&lt;br /&gt;
database                = \$dir/ca.db.index&lt;br /&gt;
serial                  = \$dir/ca.db.serial&lt;br /&gt;
RANDFILE                = \$dir/ca.db.rand&lt;br /&gt;
certificate             = \$dir/ca.crt&lt;br /&gt;
private_key             = \$dir/ca.key&lt;br /&gt;
unique_subject          = no&lt;br /&gt;
# default key expiry set to 5 years but can be changed&lt;br /&gt;
default_days            = 1825&lt;br /&gt;
default_crl_days        = 30&lt;br /&gt;
default_md              = md5&lt;br /&gt;
preserve                = no&lt;br /&gt;
policy                  = policy_anything&lt;br /&gt;
[ policy_anything ]&lt;br /&gt;
countryName             = optional&lt;br /&gt;
stateOrProvinceName     = optional&lt;br /&gt;
localityName            = optional&lt;br /&gt;
organizationName        = optional&lt;br /&gt;
organizationalUnitName  = optional&lt;br /&gt;
commonName              = supplied&lt;br /&gt;
emailAddress            = optional&lt;br /&gt;
EOT&lt;br /&gt;
&lt;br /&gt;
#  sign the certificate&lt;br /&gt;
echo &amp;quot;CA signing: $CSR -&amp;amp;gt; $CERT:&amp;quot;&lt;br /&gt;
openssl ca -config ca.config -out $CERT -infiles $CSR&lt;br /&gt;
echo &amp;quot;CA verifying: $CERT &amp;amp;lt;-&amp;amp;gt; CA cert&amp;quot;&lt;br /&gt;
openssl verify -CAfile ca.crt $CERT&lt;br /&gt;
&lt;br /&gt;
#  cleanup after SSLeay&lt;br /&gt;
rm -f ca.config&lt;br /&gt;
rm -f ca.db.serial.old&lt;br /&gt;
rm -f ca.db.index.old&lt;br /&gt;
&lt;br /&gt;
#  die gracefully&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Make sign.sh owned by root and executable &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;chown admin:administrators /opt/etc/openssl/sign.sh&lt;br /&gt;
 chmod 700 /opt/etc/openssl/sign.sh &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Creating the Keys and Certificates &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;openssl genrsa -des3 -out ca.key 1024 &lt;br /&gt;
 mv ca.key ca.key.orig&lt;br /&gt;
 openssl rsa -in ca.key.orig -out ca.key&lt;br /&gt;
 openssl req -new -x509 -days 1825 -key ca.key -out ca.crt&lt;br /&gt;
 cp /opt/etc/openssl/ca.crt /opt/etc/ftpd/&lt;br /&gt;
 openssl genrsa -des3 -out server.key 1024&lt;br /&gt;
 mv server.key server.key.orig&lt;br /&gt;
 openssl rsa -in server.key.orig -out server.key&lt;br /&gt;
 cp /opt/etc/openssl/server.key /opt/etc/ftpd/ &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prepare a certificate signing request (CSR). Important - when asked for a Common Name - enter localhost &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;openssl req -new -key server.key -out server.csr&lt;br /&gt;
 ./sign.sh server.csr&lt;br /&gt;
 cp /opt/etc/openssl/server.crt /opt/etc/ftpd/ &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Setup proftpd  =&lt;br /&gt;
&lt;br /&gt;
Create a user to run proftpd &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;addgroup nogroup&amp;lt;br&amp;gt; adduser -h /home/proftpusers/ -G nogroup -s /bin/false proftpduser&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Lets change the config file, but first we do a backup of it: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cp /opt/etc/proftpd.conf /opt/etc/proftpd.conf.backup&amp;lt;br&amp;gt; vi /opt/etc/proftpd.conf&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Change it to this:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    # This is a basic ProFTPD configuration file (rename it to&lt;br /&gt;
    # 'proftpd.conf' for actual use.  It establishes a single server&lt;br /&gt;
    # and a single anonymous login.  It assumes that you have a user/group&lt;br /&gt;
    # &amp;quot;nobody&amp;quot; and &amp;quot;ftp&amp;quot; for normal operation and anon.&lt;br /&gt;
    ServerName                      &amp;quot;FTP&amp;quot;&lt;br /&gt;
    ServerType                      standalone&lt;br /&gt;
    DefaultServer                   on&lt;br /&gt;
    WtmpLog                         off&lt;br /&gt;
    #MasqueradeAddress              ftp.yourdomain.com&lt;br /&gt;
&lt;br /&gt;
    # Port 21 is the standard FTP port.&lt;br /&gt;
    Port                            21&lt;br /&gt;
    PassivePorts                    50000 50019&lt;br /&gt;
    UseReverseDNS off&lt;br /&gt;
    IdentLookups off&lt;br /&gt;
&lt;br /&gt;
    # Umask 022 is a good standard umask to prevent new dirs and files&lt;br /&gt;
    # from being group and world writable.&lt;br /&gt;
    Umask                           022&lt;br /&gt;
&lt;br /&gt;
    # To prevent DoS attacks, set the maximum number of child processes&lt;br /&gt;
    # to 30.  If you need to allow more than 30 concurrent connections&lt;br /&gt;
    # at once, simply increase this value.  Note that this ONLY works&lt;br /&gt;
    # in standalone mode, in inetd mode you should use an inetd server&lt;br /&gt;
    # that allows you to limit maximum number of processes per service&lt;br /&gt;
    # (such as xinetd).&lt;br /&gt;
    MaxInstances                    10&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;Global&amp;amp;gt;&lt;br /&gt;
      RootLogin Off&lt;br /&gt;
      RequireValidShell off&lt;br /&gt;
    # Lets use our new virtual users&lt;br /&gt;
      AuthUserFile /opt/etc/ftpd/ftpd.passwd&lt;br /&gt;
      AuthOrder mod_auth_file.c&lt;br /&gt;
      AllowStoreRestart on&lt;br /&gt;
    #  TransferRate RETR 25&lt;br /&gt;
    #  TransferRate APPE,STOR 100:2048&lt;br /&gt;
    &amp;amp;lt;/Global&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # Set the user and group under which the server will run.&lt;br /&gt;
    User                            proftpduser&lt;br /&gt;
    Group                           nogroup&lt;br /&gt;
&lt;br /&gt;
    # To cause every FTP user to be &amp;quot;jailed&amp;quot; (chrooted) into their home&lt;br /&gt;
    # directory, uncomment this line.&lt;br /&gt;
    DefaultRoot ~&lt;br /&gt;
&lt;br /&gt;
    # Normally, we want files to be overwriteable.&lt;br /&gt;
    AllowOverwrite          on&lt;br /&gt;
&lt;br /&gt;
    # Bar use of SITE CHMOD by default&lt;br /&gt;
    &amp;amp;lt;Limit SITE_CHMOD&amp;amp;gt;&lt;br /&gt;
      DenyAll&lt;br /&gt;
    &amp;amp;lt;/Limit&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    # A basic anonymous configuration, no upload directories.  If you do not&lt;br /&gt;
    # want anonymous users, simply delete this entire &amp;amp;lt;Anonymous&amp;amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;IfModule mod_tls.c&amp;amp;gt;&lt;br /&gt;
    TLSEngine on&lt;br /&gt;
    TLSLog /opt/var/proftpd/tls.log&lt;br /&gt;
    # Set the TLSProtocol to one of the following&lt;br /&gt;
    # SSLv23 - Use SSL3 for ctrl and TLS1 for data channels (works with most clients)&lt;br /&gt;
    # SSLv3  - Use only SSL3&lt;br /&gt;
    # TLSv1  - Use only TLS1&lt;br /&gt;
    TLSProtocol SSLv23&lt;br /&gt;
&lt;br /&gt;
    # Clients are required to use FTP over SSL/TLS when talking to this server&lt;br /&gt;
    # off  - clients can connect using insecure FTP or secure FTP/SSL&lt;br /&gt;
    # ctrl - encrypt only the ctrl channel using FTP/SSL&lt;br /&gt;
    # data - encrypt only the data channel using FTP/SSL (not recommended)&lt;br /&gt;
    # on   - encrypt both the ctrl and data channels using FTP/SSL&lt;br /&gt;
    TLSRequired ctrl&lt;br /&gt;
&lt;br /&gt;
    # Server's certificate&lt;br /&gt;
    TLSRSACertificateFile /opt/etc/ftpd/server.crt&lt;br /&gt;
    TLSRSACertificateKeyFile /opt/etc/ftpd/server.key&lt;br /&gt;
&lt;br /&gt;
    # CA the server trusts&lt;br /&gt;
    TLSCACertificateFile /opt/etc/ftpd/ca.crt&lt;br /&gt;
&lt;br /&gt;
    # Authenticate clients that want to use FTP over SSL/TLS&lt;br /&gt;
    # off - client SSL certificates are not requried&lt;br /&gt;
    # on  - client SSL certificates are required&lt;br /&gt;
    TLSVerifyClient off&lt;br /&gt;
    &amp;amp;lt;/IfModule&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Or if you want some logging, use this (I use this one):&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    # This is a basic ProFTPD configuration file (rename it to&lt;br /&gt;
    # 'proftpd.conf' for actual use.  It establishes a single server&lt;br /&gt;
    # and a single anonymous login.  It assumes that you have a user/group&lt;br /&gt;
    # &amp;quot;nobody&amp;quot; and &amp;quot;ftp&amp;quot; for normal operation and anon.&lt;br /&gt;
    ServerName                      &amp;quot;FTP&amp;quot;&lt;br /&gt;
    ServerType                      standalone&lt;br /&gt;
    DefaultServer                   on&lt;br /&gt;
    WtmpLog                         off&lt;br /&gt;
    #MasqueradeAddress              ftp.yourdomain.com&lt;br /&gt;
&lt;br /&gt;
    # Port 21 is the standard FTP port.&lt;br /&gt;
    Port                            21&lt;br /&gt;
    PassivePorts                    50000 50019&lt;br /&gt;
    UseReverseDNS off&lt;br /&gt;
    IdentLookups off&lt;br /&gt;
&lt;br /&gt;
    # Umask 022 is a good standard umask to prevent new dirs and files&lt;br /&gt;
    # from being group and world writable.&lt;br /&gt;
    Umask                           022&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # To prevent DoS attacks, set the maximum number of child processes&lt;br /&gt;
    # to 30.  If you need to allow more than 30 concurrent connections&lt;br /&gt;
    # at once, simply increase this value.  Note that this ONLY works&lt;br /&gt;
    # in standalone mode, in inetd mode you should use an inetd server&lt;br /&gt;
    # that allows you to limit maximum number of processes per service&lt;br /&gt;
    # (such as xinetd).&lt;br /&gt;
    MaxInstances                    10&lt;br /&gt;
&lt;br /&gt;
    # Logging options&lt;br /&gt;
    #&lt;br /&gt;
    TransferLog                     /opt/var/proftpd/xferlog.legacy&lt;br /&gt;
    #&lt;br /&gt;
    # Some logging formats&lt;br /&gt;
    #&lt;br /&gt;
    LogFormat                       default &amp;quot;%h&amp;amp;nbsp;%l&amp;amp;nbsp;%u&amp;amp;nbsp;%t \&amp;quot;%r\&amp;quot;&amp;amp;nbsp;%s&amp;amp;nbsp;%b&amp;quot;&lt;br /&gt;
    LogFormat                       auth    &amp;quot;%v [%P]&amp;amp;nbsp;%h&amp;amp;nbsp;%t \&amp;quot;%r\&amp;quot;&amp;amp;nbsp;%s&amp;quot;&lt;br /&gt;
    LogFormat                       write   &amp;quot;%h&amp;amp;nbsp;%l&amp;amp;nbsp;%u&amp;amp;nbsp;%t \&amp;quot;%r\&amp;quot;&amp;amp;nbsp;%s&amp;amp;nbsp;%b&amp;quot;&lt;br /&gt;
    #&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;Global&amp;amp;gt;&lt;br /&gt;
      RootLogin Off&lt;br /&gt;
      RequireValidShell off&lt;br /&gt;
    # Lets use our new virtual users&lt;br /&gt;
      AuthUserFile /opt/etc/ftpd/ftpd.passwd&lt;br /&gt;
      AuthOrder mod_auth_file.c&lt;br /&gt;
      AllowStoreRestart on&lt;br /&gt;
    #  TransferRate RETR 25&lt;br /&gt;
    #  TransferRate APPE,STOR 100:2048&lt;br /&gt;
    #&lt;br /&gt;
    # Logging&lt;br /&gt;
    # file/dir access&lt;br /&gt;
    ExtendedLog             /opt/var/proftpd/access.log WRITE,READ write&lt;br /&gt;
    #&lt;br /&gt;
    # Record all logins&lt;br /&gt;
    ExtendedLog             /opt/var/proftpd/auth.log AUTH auth&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;/Global&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # Set the user and group under which the server will run.&lt;br /&gt;
    User                            proftpduser&lt;br /&gt;
    Group                           nogroup&lt;br /&gt;
&lt;br /&gt;
    # To cause every FTP user to be &amp;quot;jailed&amp;quot; (chrooted) into their home&lt;br /&gt;
    # directory, uncomment this line.&lt;br /&gt;
    DefaultRoot ~&lt;br /&gt;
&lt;br /&gt;
    # Normally, we want files to be overwriteable.&lt;br /&gt;
    AllowOverwrite          on&lt;br /&gt;
&lt;br /&gt;
    # Bar use of SITE CHMOD by default&lt;br /&gt;
    &amp;amp;lt;Limit SITE_CHMOD&amp;amp;gt;&lt;br /&gt;
      DenyAll&lt;br /&gt;
    &amp;amp;lt;/Limit&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    # A basic anonymous configuration, no upload directories.  If you do not&lt;br /&gt;
    # want anonymous users, simply delete this entire &amp;amp;lt;Anonymous&amp;amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;IfModule mod_tls.c&amp;amp;gt;&lt;br /&gt;
    TLSEngine on&lt;br /&gt;
    TLSLog /opt/var/proftpd/tls.log&lt;br /&gt;
    # Set the TLSProtocol to one of the following&lt;br /&gt;
    # SSLv23 - Use SSL3 for ctrl and TLS1 for data channels (works with most clients)&lt;br /&gt;
    # SSLv3  - Use only SSL3&lt;br /&gt;
    # TLSv1  - Use only TLS1&lt;br /&gt;
    TLSProtocol SSLv23&lt;br /&gt;
&lt;br /&gt;
    # Clients are required to use FTP over SSL/TLS when talking to this server&lt;br /&gt;
    # off  - clients can connect using insecure FTP or secure FTP/SSL&lt;br /&gt;
    # ctrl - encrypt only the ctrl channel using FTP/SSL&lt;br /&gt;
    # data - encrypt only the data channel using FTP/SSL (not recommended)&lt;br /&gt;
    # on   - encrypt both the ctrl and data channels using FTP/SSL&lt;br /&gt;
    TLSRequired ctrl&lt;br /&gt;
&lt;br /&gt;
    # Server's certificate&lt;br /&gt;
    TLSRSACertificateFile /opt/etc/ftpd/server.crt&lt;br /&gt;
    TLSRSACertificateKeyFile /opt/etc/ftpd/server.key&lt;br /&gt;
&lt;br /&gt;
    # CA the server trusts&lt;br /&gt;
    TLSCACertificateFile /opt/etc/ftpd/ca.crt&lt;br /&gt;
&lt;br /&gt;
    # Authenticate clients that want to use FTP over SSL/TLS&lt;br /&gt;
    # off - client SSL certificates are not requried&lt;br /&gt;
    # on  - client SSL certificates are required&lt;br /&gt;
    TLSVerifyClient off&lt;br /&gt;
    &amp;amp;lt;/IfModule&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Say you have a dir called 'uploads', where you like them to be able to upload files. Add this code just above &amp;amp;lt;/Global&amp;amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;    # An upload directory that allows storing files but not retrieving&lt;br /&gt;
    # or creating directories.&lt;br /&gt;
    &amp;amp;lt;Limit WRITE&amp;amp;gt;&lt;br /&gt;
          DenyAll&lt;br /&gt;
    &amp;amp;lt;/Limit&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;Directory /home/proftpusers/uploads/*&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;Limit READ&amp;amp;gt;&lt;br /&gt;
    DenyAll&lt;br /&gt;
    &amp;amp;lt;/Limit&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;Limit STOR&amp;amp;gt;&lt;br /&gt;
    AllowAll&lt;br /&gt;
    &amp;amp;lt;/Limit&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/Directory&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If you get disconnection problems with your FTP client, as an example say you want to copy several files but after the first file the other files don't get copied. And you need to close and restart the client to continue and in your TLS log you see something like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;Apr 18 05:27:33 mod_tls/2.4.3[12797]: client did not reuse SSL session, rejecting data connection (see the NoSessionReuseRequired TLSOptions parameter)&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then you can try to add &lt;br /&gt;
&amp;lt;pre&amp;gt;TLSOptions NoSessionReuseRequired&amp;lt;/pre&amp;gt; &lt;br /&gt;
inside of &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;IfModule mod_tls.c&amp;amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;amp;lt;/IfModule&amp;amp;gt;&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Don't forget: &lt;br /&gt;
&lt;br /&gt;
*Pathnames in &amp;amp;lt;Directory ...&amp;amp;gt; must always be absolute (except inside &amp;amp;lt;Anonymous&amp;amp;gt;), and should not reference symbolic links &lt;br /&gt;
*You may need to do a 'chmod 777' on the directory for this to work (dirs where you don't want 'them' to write you can have chmod 755) &lt;br /&gt;
*After a change in proftpd.conf, restart proftpd ('ps' -&amp;amp;gt; check the PID -&amp;amp;gt; 'kill &amp;amp;lt;pid&amp;amp;gt;' -&amp;amp;gt; '/opt/sbin/proftpd &amp;amp;amp;'&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
About &amp;amp;lt;Directory ...&amp;amp;gt;&amp;lt;br&amp;gt;http://www.proftpd.org/docs/directives/linked/config_ref_Directory.html &lt;br /&gt;
&lt;br /&gt;
About &amp;amp;lt;Limit ...&amp;amp;gt;&amp;lt;br&amp;gt;http://www.proftpd.org/docs/directives/linked/config_ref_Limit.html &lt;br /&gt;
&lt;br /&gt;
-- More --&amp;lt;br&amp;gt;Configuration Directives by Functionality&amp;lt;br&amp;gt;http://www.castaglia.org/proftpd/doc/contrib/functional-directive-index.html &lt;br /&gt;
&lt;br /&gt;
ProFTPD Configuration Directives By Context&amp;lt;br&amp;gt;http://www.castaglia.org/proftpd/doc/contrib/contextual-directive-index.html &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EVEN MORE ----&amp;lt;br&amp;gt;Howtos, configs etc:&amp;lt;br&amp;gt;http://www.castaglia.org/proftpd/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Lets try it  =&lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/sbin/proftpd &amp;amp;amp; &amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since 1.3.2 is available for Qnap ipkg, so any FileZilla client should work with these settings:&amp;lt;br&amp;gt;'''GENERAL'''&amp;lt;br&amp;gt;Servertype: FTPES - FTP over explicit TLS/SSL&amp;lt;br&amp;gt;Logontype: Normal&lt;br /&gt;
&lt;br /&gt;
'''TRANSFER SETTINGS'''&lt;br /&gt;
&lt;br /&gt;
Transfer mode: Active&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Communications]] [[Category:FTP_Server]] [[Category:Installation_and_Setup]] [[Category:Miscellaneous]] [[Category:QPKG]] [[Category:Optware_IPKG]]&lt;/div&gt;</summary>
		<author><name>Raffe</name></author>
	</entry>
</feed>