流程:
$ sudo apt-get install nginx proftpd
$ sudo vim /etc/proftpd/proftpd.conf
Include /etc/proftpd/tls.conf
$ sudo vim /etc/proftpd/tls.conf
TLSEngine on
TLSLog /var/log/proftpd/tls.log
TLSProtocol SSLv23
TLSRSACertificateFile /etc/ssl/certs/proftpd.crt
TLSRSACertificateKeyFile /etc/ssl/private/proftpd.key
$ sudo openssl req -x509 -newkey rsa:1024 -keyout /etc/ssl/private/proftpd.key -out /etc/ssl/certs/proftpd.crt -nodes -days 3650
$ sudo vim /etc/proftpd/conf.d/AuthUserFile.conf
DefaultRoot ~
AuthUserFile /etc/proftpd/ftpd.passwd
RequireValidShell off
$ id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)
$ sudo ftpasswd --file /etc/proftpd/ftpd.passwd --passwd --name webadmin --home /usr/share/nginx/www --shell=/bin/false --uid 33
$ sudo chown -R www-data:www-data /usr/share/nginx/www
$ sudo service proftpd restart
沒有留言:
張貼留言