0

I have a minimal install of Centos in VirtualBox. I want to run a ftp service to share files between the host and my VM, and then learn about ftp servers.

I installed vsftpd and changed the vsftpd.conf file as bellow:

anonymous_enable=NO 
local_enable=YES 
write_enable=YES 
local_umask=O22 
dirmessage_enable=YES 
xferlog_enable=YES 
connect_from_port 2O=YES 
xferlog_std format=YES 
chroot_local_user=YES 
listen_ipv6=YES 
pam_service_name=vsftpd 
userlist_enable=YES 
tcp_wrappers=YES

But, when I type service vsftpd start I get the following error:

Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and journalctl -xe" for details.

Is this issue happening due of a wrong config as showed above, or is it something else? What can I do to start my ftp server?

Thanks!

EDIT

Output if systemctl status -l vsftpd.service

[user@localhost vsftpd]$ systemctl status -l vsftpd.service
vsftpd.service - Vsftpd ftp daemon 
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service, disabled; vendor preset: disabled) 
Active: failed (Result: exit-code) since Ter 2017-05-09 21:03:19 -03; 3min 2s ago 
Process: 3047 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited status=2) 
Mai 09 21:03:19 localhost.localdomain systemd[1]: Starting Vsftpd ftp daemon... 
Mai 09 21:03:19 localhost.localdomain systemd[1]: vsftpd.service: control process exited, code=exited status=2 
Mai 09 21:03:19 localhost.localdomain systemd[1]: Failed to start Vsftpd ftp daemon. 
Mai 09 21:03:19 localhost.localdomain systemd[1]: Unit vsftpd.service entered failed state. 
Mai 09 21:03:19 localhost.localdomain systemd[1]: vsftpd.service failed. 
[user@localhost vsftpd]$ 
tdmsoares
  • 137
  • 1
  • 2
  • 8

4 Answers4

3

You have a space between xferlog_std and format=YES according to the configuration you supplied.

Also, you might wish to compare with a working configuration:

    $ sudo cat /etc/vsftpd/vsftpd.conf | grep -v "#"
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=abdullah
xferlog_std_format=YES
chroot_local_user=YES
listen=NO
listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

Source: Not able to upload as anonymous user in vsftpd

Abdullah
  • 299
  • 1
  • 7
  • 1
    Similaryly, there's a space (and a capital "O", not zero "0") in `connect_from_port 2O=YES`; it should be `connect_from_port_20=YES`. – Castaglia May 12 '17 at 16:44
  • Man, in the mean time I replaced the vsftpd.conf for the original one, and it worked... The problem was the config file... The space you said, was only a typo, because I couldn't copy and paste from my VM machine – tdmsoares May 12 '17 at 22:12
1

In my case I have another process on TCP 21.

$ netstat -nalp | grep 21

I saw xinetd on the port at this time. Vfstpd successfully starts after stoppping it.

$ service stop xinetd
kujiy
  • 221
  • 2
  • 8
0

I had issues with the port 21 as well, but it worked by stopping the xinetd service with this command:

systemctl stop xinetd

This service stop xinetd didn't work.

xarlymg89
  • 103
  • 3
0

in /etc/vsftpd/vsftpd.conf the setting listen_ipv6=yes was causing vsftpd to try and listen on both ipv6 and ipv4. Set listen_ipv6=no fixed it for me.

After making the change stop and start the service.