Page 1 of 1

How to replace ProFTPD with vsftpd on a Debian or Ubuntu

Posted: Fri Apr 05, 2019 7:03 pm
by Spheerys
Hi,

I have found this on the official doc : http://vestacp.com/docs/#how-to-replace ... ian-ubuntu
But I need to do the opposite : I have installed proftpd on VestaCP install but I can't easily get SSL/ secure connexion for my customer which don't know what is a ssh key for SFTP

I tried to reinsall vsftpd but I had error and I don't want to broke anithing more.

Can you please help me to insatll vsftpd properly ?

Re: How to replace ProFTPD with vsftpd on a Debian or Ubuntu

Posted: Tue Apr 09, 2019 8:44 pm
by dreiggy
Hi,
I have changed proftpd to vsftpd on centos 7. I think you may try to do some reverse steps for debian/ubuntu...

1) Disable proftpd

Code: Select all

service proftpd stop
update-rc.d -f proftpd remove
2) Install software package

Code: Select all

apt-get install vsftpd
3) Download configuration (I'm not sure if configuration location on debian/ubuntu is correct)

Code: Select all

wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/debian/9/vsftpd/vsftpd.conf -O /etc/vsftpd.conf
4) Change vesta settings

Code: Select all

sed -i "s/proftpd/vsftpd/" /usr/local/vesta/conf/vesta.conf
5) Restart vsftpd and vesta

Code: Select all

service vsftpd restart && service vesta restart
I've not tested this on debian/ubuntu. So you should try it by yourself ;) Good luck!

Additional bonus SSL/TLS enable tutorial: /viewtopic.php?f=44&t=18559

Re: How to replace ProFTPD with vsftpd on a Debian or Ubuntu

Posted: Wed Apr 10, 2019 1:40 pm
by Spheerys
Thanks it's look pretty good !
The point is I have a relativly undocumented error on the web during vsftpd insatllation :

Code: Select all

mkdir: cannot create directory ‘/srv/ftp’: Permission denied
And effectively, I can't create this directory even with root user.
I'm blocked and this point :(

I'm running Ubuntu 18.04

Re: How to replace ProFTPD with vsftpd on a Debian or Ubuntu

Posted: Wed Apr 10, 2019 2:28 pm
by Spheerys
OK I finally install with succes by cleaning package and reinstall it :
cd /var/cache/apt/archives/
rm vsftpd_*.deb
apt-get clean
apt-get autoremove
apt-get update
apt-get install vsftpd
The service was masked :

Code: Select all

Failed to start vsftpd.service: Unit vsftpd.service is masked.
I unmask it :

Code: Select all

systemctl unmask vsftpd.service
and start it :

Code: Select all

systemctl start vsftpd.service
the status looks good :

Code: Select all

● vsftpd.service - LSB: Very secure FTP server
   Loaded: loaded (/etc/init.d/vsftpd; generated)
   Active: active (exited) since Wed 2019-04-10 16:08:32 CEST; 14s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2790 ExecStart=/etc/init.d/vsftpd start (code=exited, status=0/SUCCESS)

avril 10 16:08:32 peace systemd[1]: Starting LSB: Very secure FTP server...
avril 10 16:08:32 peace systemd[1]: Started LSB: Very secure FTP server.
But on vestacp admin panel, the vsftpd service looks not started (it's in grey).

The command "lsof -i -n -P | grep ':21'" give me no result

If I restart vsftpd, on the syslog file I have :

Code: Select all

Apr 10 16:27:56 peace systemd[1]: Stopping LSB: Very secure FTP server...
Apr 10 16:27:56 peace systemd[1]: Stopped LSB: Very secure FTP server.
Apr 10 16:27:56 peace systemd[1]: Starting LSB: Very secure FTP server...
Apr 10 16:27:56 peace systemd[1]: Started LSB: Very secure FTP server.
Something going wrong, but what ???

Re: How to replace ProFTPD with vsftpd on a Debian or Ubuntu

Posted: Wed Apr 10, 2019 3:32 pm
by dreiggy
Have you changed proftpd to vsftpd in vesta.conf?

Try check with this commands:

# netstat -tulpn | grep ':21'
# ps aux | grep vsftpd

Re: How to replace ProFTPD with vsftpd on a Debian or Ubuntu

Posted: Wed Apr 10, 2019 3:37 pm
by Spheerys
Yes I changed it :

Code: Select all

cat /usr/local/vesta/conf/vesta.conf
WEB_SYSTEM='apache2'
WEB_RGROUPS='www-data'
WEB_PORT='8080'
WEB_SSL_PORT='8443'
WEB_SSL='mod_ssl'
PROXY_SYSTEM='nginx'
PROXY_PORT='80'
PROXY_SSL_PORT='443'
STATS_SYSTEM='webalizer,awstats'
FTP_SYSTEM='vsftpd'
MAIL_SYSTEM='exim4'
IMAP_SYSTEM='dovecot'
CRON_SYSTEM='cron'
FIREWALL_SYSTEM='iptables'
FIREWALL_EXTENSION='fail2ban'
BACKUP_SYSTEM='local'
LANGUAGE='fr'
VERSION='0.9.8'
DB_SYSTEM='mysql'
DISK_QUOTA='no'
BACKUP='/backups/vestacp'
The ps and the netstat give me no answer
Strange didn't it ?

Re: How to replace ProFTPD with vsftpd on a Debian or Ubuntu

Posted: Fri Apr 12, 2019 9:52 pm
by dreiggy
Try check vsftpd.log file in /var/log directory. Maybe here will be some errors.

Re: How to replace ProFTPD with vsftpd on a Debian or Ubuntu

Posted: Sat Apr 13, 2019 6:51 am
by Spheerys
This log stay empty even with good parameters on the conf file.
It is another clue about the problem...

Re: How to replace ProFTPD with vsftpd on a Debian or Ubuntu

Posted: Mon Apr 22, 2019 9:22 pm
by dreiggy
Spheerys wrote:
Sat Apr 13, 2019 6:51 am
This log stay empty even with good parameters on the conf file.
It is another clue about the problem...
Seems here is needed deeper debuging. Try use strace when starting up vsftpd service.

Code: Select all

strace -s1000 service vsftpd start
(PS. you should have installed strace package)