7

I have installed vsftpd on Ubuntu Raring Ringtail, and made a few changes to the config file.

When I try to run with these changes, the service never starts.

Reverting to default config, the service then runs.

Here is my config file

I got the changes from this guide: Howto: Easy FTP with vsftpd

I can't figure out the problem, as I don't know what half of it means...

Saurav Kumar
  • 14,916
Luke
  • 301
  • 2
    can you post some log outputs pls? – fecub Sep 06 '13 at 11:48
  • 1
    There doesn't seem to be any log... – Luke Sep 09 '13 at 09:13
  • 1
    in the configuration file, set "syslog_enable" to YES restart the daemon! and output the log with "tail /var/log/vsftpd.log" – fecub Sep 09 '13 at 10:27
  • There is no such log. – Luke Sep 13 '13 at 13:34
  • I have the exact same settings as you, except:

    ssl_enable=YES allow_anon_ssl=NO force_local_data_ssl=YES force_local_logins_ssl=YES ssl_tlsv1=YES ssl_sslv2=YES ssl_sslv3=YES

    Can you comment these out and try again? (maybe a problem in your ssl config) Also, put the log file somewhere else E.g. /tmp/vsftpd.log

    – Fabby Nov 23 '14 at 19:18

4 Answers4

4

looking at you config I can see a few minor issues that might be causing it not to start.

First I recommend you shrink down the config file to just the variables you need like the following.

listen=YES
listen_port=21
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
syslog_enable=NO
vsftpd_log_file=/var/log/vsftpd.log 

for information on what you can use go to https://security.appspot.com/vsftpd/vsftpd_conf.html

you might want to add a local_root=/folder/folder to aviod possible problems but its not required

remove

xferlog_enable=YES

some reason the default config has it on but the log location off!

its also important to note that xferlog_enabled and syslog_enable are for different logs. seen many people mix these settings and get nothing.

remove

pam_service_name=vsftpd

since you dont have guest_enable in you config file this setting does nothing. Plus other varaibles are needed for PAM to work see

How to setup virtual users for vsftpd with access to a specific sub directory?

remove

dirmessage_enable=YES

you need to provide the message_file variable for it to work

remove

listen_port=21 because 21 is the default anyway

use_localtime=YES because server time is more reliable

connect_from_port_20=YES this is not needed apart from in advanced configurations

also you might want to turn your logs

change

syslog_enable=NO

to

syslog_enable=YES

the resulting config file should be

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
syslog_enable=YES
vsftpd_log_file=/var/log/vsftpd.log

If that doesn't work remove the SSL settings and set a

Avenyet
  • 864
  • 1
  • 7
  • 14
1

run

sudo lsof -i | grep ftp

see if any service is using the listen to ftp. Stop that service. Now try to run vsftp service.

0

This is an old post now but my install was failing due to the ipv6 element. Not well documented online - uncomment the ipv6 line and change the value to =no

Hope this helps someone

0

to make vsftp log you have to set it on the config file . here you have how edit vsftp to make it log

after that try to start the service with /etc/init.d/vsftp start

and then check the log with cat /var/log/vsftp.log

finally post the log for better help :D

Sarastro
  • 197
  • 1
  • 3
  • 11