Vsftpd listen yes ошибка

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

Решено: vsftpd (не работает listen_ipv6=YES [РЕШЕНО])

Модератор: SLEDopit

Аватара пользователя

gluk47

Сообщения: 297
Статус: Любитель гвоздей и микроскопов
ОС: Kubuntu 17.10

Решено: vsftpd

Добрый день всем.

Как настроить vsftd на работу с ipv6? В конфиге уже всё написано.

Код:

# cd /etc/vsftpd
# grep -r listen.*= vsftpd.ipv6.conf
listen=NO
listen_ipv6=YES

# service vsftpd restart
Завершение работы vsftpd: [ ОК ]
Запускается vsftpd для vsftpd: [ ОК ]
Запускается vsftpd для vsftpd.ipv6: [ ОШИБКА ]

# vsftpd vsftpd.ipv6.conf
# echo $?
1
# ping6 ipv6.google.com -c1
PING ipv6.google.com(2a00:1450:8004::6a) 56 data bytes
64 bytes from 2a00:1450:8004::6a: icmp_seq=1 ttl=53 time=90.9 ms

[gluk47@gluk47-desktop ~]$ ензу куищще
куищще is aliased to `reboot’

Аватара пользователя

AnViar

Сообщения: 182
ОС: Linux, Solaris
Контактная информация:

Аватара пользователя

rm_

Сообщения: 3340
Статус: It’s the GNU Age
ОС: Debian
Контактная информация:

Re: Решено: vsftpd

Сообщение

rm_ »

Посмотреть:

Если там 0, переключить в 1:

Попробовать перезапустить vsftpd ещё раз.

Либо оставить в 0, но тогда убрать запуск первого vsftpd, того что с vsftpd.conf-просто, в результате один процесс (тот что в логе вторым по счёту) будет слушать оба протокола (но это может не сработать, и не очень-то рекомендуется).

Аватара пользователя

gluk47

Сообщения: 297
Статус: Любитель гвоздей и микроскопов
ОС: Kubuntu 17.10

Re: Решено: vsftpd

Сообщение

gluk47 »

sash-kan писал(а): ↑

26.05.2010 01:09

gluk47 писал(а): ↑

25.05.2010 21:57

[ ОШИБКА ]

логи.

Простите за глупый вопрос: где хранятся логи? :)

Код: Выделить всё

# ls /var/log/vsftp*
ls: невозможно получить доступ к /var/log/vsftp*: Нет такого файла или каталога
# service vsftpd restart
Завершение работы vsftpd:                              [   ОК  ]
Запускается vsftpd для vsftpd:                         [   ОК  ]
Запускается vsftpd для vsftpd.ipv6:                    [ ОШИБКА ]
# # ls /var/log/vsftp*
ls: невозможно получить доступ к /var/log/vsftp*: Нет такого файла или каталога

AnViar писал(а): ↑

26.05.2010 11:37

и

Всё-таки от суперпользователя)

Код: Выделить всё

$ netstat -nlp|grep ftp
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
# netstat -nlp|grep ftp
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      28934/vsftpd

Как и ожидалось)

rm_ писал(а): ↑

26.05.2010 13:44

Что за магия о_О И почему smbd и sshd без этого работают?

Спасибо, теперь всё работает! :)

[gluk47@gluk47-desktop ~]$ ензу куищще
куищще is aliased to `reboot’

Аватара пользователя

SLEDopit

Модератор
Сообщения: 4817
Статус: фанат консоли (=
ОС: GNU/Debian, RHEL

Re: Решено: vsftpd

Сообщение

SLEDopit »

gluk47 писал(а): ↑

26.05.2010 15:21

Простите за глупый вопрос: где хранятся логи?

Код: Выделить всё

 $ head -1 /etc/issue
Debian GNU/Linux squeeze/sid \n \l
 $ ls -l /var/log/vsftpd.log
-rw-r----- 1 root adm 7165 May 25 21:20 /var/log/vsftpd.log

может у вас syslog_enable включен?

Код: Выделить всё

syslog_enable
If  enabled,  then  any  log  output  which  would  have gone to
/var/log/vsftpd.log goes to the system log instead.  Logging  is
done under the FTPD facility.
Default: NO

UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don’t do mistakes, the more bugs are in your code.

Аватара пользователя

gluk47

Сообщения: 297
Статус: Любитель гвоздей и микроскопов
ОС: Kubuntu 17.10

Re: Решено: vsftpd

Сообщение

gluk47 »

Да нет, логи туда создаются (/var/log/vsftpd.log), но там только записи о подключениях. А про ошибку там не было ни слова (и про успешный запуск демона).

[gluk47@gluk47-desktop ~]$ ензу куищще
куищще is aliased to `reboot’

Аватара пользователя

KiWi

Бывший модератор
Сообщения: 2521
Статус: статус, статус, статус
Контактная информация:

Re: Решено: vsftpd

Сообщение

KiWi »

gluk47 писал(а): ↑

26.05.2010 15:21

rm_ писал(а): ↑

26.05.2010 13:44

Что за магия о_О И почему smbd и sshd без этого работают?

Спасибо, теперь всё работает! :)

Как уже выше говорили — у вас запускается ДВА vsftpd.
Один слушает ipv4, а второй — пытается слушать ipv4+ipv6.


1

1

localadmin@it-1:~$ sudo service vsftpd status
● vsftpd.service - vsftpd FTP server
   Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Пт 2016-09-09 10:40:30 KRAT; 4s ago
  Process: 5971 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2)
  Process: 5967 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
 Main PID: 5971 (code=exited, status=2)
localadmin@it-1:~$ ps -aux|grep ftp
localad+  6444  0.0  0.0  22960  1088 pts/0    S+   11:20   0:00 grep --color=auto ftp
localadmin@it-1:~$ nmap localhost 

Starting Nmap 7.01 ( https://nmap.org ) at 2016-09-09 11:20 KRAT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000099s latency).
Not shown: 996 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
25/tcp  open  smtp
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds

Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds
localadmin@it-1:~$ 

Конф. файл…

localadmin@it-1:~$ cat /etc/vsftpd.conf
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
#
# Run standalone?  vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=YES
#
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
listen_ipv6=YES
#
# Allow anonymous FTP? (Disabled by default).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# If enabled, vsftpd will display directory listings with the time
# in  your  local  time  zone.  The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may restrict local users to their home directories.  See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# Customization
#
# Some of vsftpd's settings don't fit the filesystem layout by
# default.
#
# This option should be the name of a directory which is empty.  Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO

#
# Uncomment this to indicate that vsftpd use a utf8 filesystem.
#utf8_filesystem=YES

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

Решено: vsftpd (не работает listen_ipv6=YES [РЕШЕНО])

Модератор: SLEDopit

Аватара пользователя

gluk47

Сообщения: 297
Статус: Любитель гвоздей и микроскопов
ОС: Kubuntu 17.10

Решено: vsftpd

Добрый день всем.

Как настроить vsftd на работу с ipv6? В конфиге уже всё написано.

Код:

# cd /etc/vsftpd
# grep -r listen.*= vsftpd.ipv6.conf
listen=NO
listen_ipv6=YES

# service vsftpd restart
Завершение работы vsftpd: [ ОК ]
Запускается vsftpd для vsftpd: [ ОК ]
Запускается vsftpd для vsftpd.ipv6: [ ОШИБКА ]

# vsftpd vsftpd.ipv6.conf
# echo $?
1
# ping6 ipv6.google.com -c1
PING ipv6.google.com(2a00:1450:8004::6a) 56 data bytes
64 bytes from 2a00:1450:8004::6a: icmp_seq=1 ttl=53 time=90.9 ms

[gluk47@gluk47-desktop ~]$ ензу куищще
куищще is aliased to `reboot’

Аватара пользователя

AnViar

Сообщения: 182
ОС: Linux, Solaris
Контактная информация:

Аватара пользователя

rm_

Сообщения: 3340
Статус: It’s the GNU Age
ОС: Debian
Контактная информация:

Re: Решено: vsftpd

Сообщение

rm_ » 26.05.2010 13:44

Посмотреть:

Если там 0, переключить в 1:

Попробовать перезапустить vsftpd ещё раз.

Либо оставить в 0, но тогда убрать запуск первого vsftpd, того что с vsftpd.conf-просто, в результате один процесс (тот что в логе вторым по счёту) будет слушать оба протокола (но это может не сработать, и не очень-то рекомендуется).

Аватара пользователя

gluk47

Сообщения: 297
Статус: Любитель гвоздей и микроскопов
ОС: Kubuntu 17.10

Re: Решено: vsftpd

Сообщение

gluk47 » 26.05.2010 15:21

sash-kan писал(а): ↑

26.05.2010 01:09

gluk47 писал(а): ↑

25.05.2010 21:57

[ ОШИБКА ]

логи.

Простите за глупый вопрос: где хранятся логи? :)

Код: Выделить всё

# ls /var/log/vsftp*
ls: невозможно получить доступ к /var/log/vsftp*: Нет такого файла или каталога
# service vsftpd restart
Завершение работы vsftpd:                              [   ОК  ]
Запускается vsftpd для vsftpd:                         [   ОК  ]
Запускается vsftpd для vsftpd.ipv6:                    [ ОШИБКА ]
# # ls /var/log/vsftp*
ls: невозможно получить доступ к /var/log/vsftp*: Нет такого файла или каталога

AnViar писал(а): ↑

26.05.2010 11:37

и

Всё-таки от суперпользователя)

Код: Выделить всё

$ netstat -nlp|grep ftp
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
# netstat -nlp|grep ftp
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      28934/vsftpd

Как и ожидалось)

rm_ писал(а): ↑

26.05.2010 13:44

Что за магия о_О И почему smbd и sshd без этого работают?

Спасибо, теперь всё работает! :)

[gluk47@gluk47-desktop ~]$ ензу куищще
куищще is aliased to `reboot’

Аватара пользователя

SLEDopit

Модератор
Сообщения: 4814
Статус: фанат консоли (=
ОС: GNU/Debian, RHEL

Re: Решено: vsftpd

Сообщение

SLEDopit » 26.05.2010 15:52

gluk47 писал(а): ↑

26.05.2010 15:21

Простите за глупый вопрос: где хранятся логи?

Код: Выделить всё

 $ head -1 /etc/issue
Debian GNU/Linux squeeze/sid n l
 $ ls -l /var/log/vsftpd.log
-rw-r----- 1 root adm 7165 May 25 21:20 /var/log/vsftpd.log

может у вас syslog_enable включен?

Код: Выделить всё

syslog_enable
If  enabled,  then  any  log  output  which  would  have gone to
/var/log/vsftpd.log goes to the system log instead.  Logging  is
done under the FTPD facility.
Default: NO

UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don’t do mistakes, the more bugs are in your code.

Аватара пользователя

gluk47

Сообщения: 297
Статус: Любитель гвоздей и микроскопов
ОС: Kubuntu 17.10

Re: Решено: vsftpd

Сообщение

gluk47 » 26.05.2010 18:10

Да нет, логи туда создаются (/var/log/vsftpd.log), но там только записи о подключениях. А про ошибку там не было ни слова (и про успешный запуск демона).

[gluk47@gluk47-desktop ~]$ ензу куищще
куищще is aliased to `reboot’

Аватара пользователя

KiWi

Бывший модератор
Сообщения: 2521
Статус: статус, статус, статус
Контактная информация:

Re: Решено: vsftpd

Сообщение

KiWi » 26.05.2010 20:59

gluk47 писал(а): ↑

26.05.2010 15:21

rm_ писал(а): ↑

26.05.2010 13:44

Что за магия о_О И почему smbd и sshd без этого работают?

Спасибо, теперь всё работает! :)

Как уже выше говорили — у вас запускается ДВА vsftpd.
Один слушает ipv4, а второй — пытается слушать ipv4+ipv6.

I just installed VSFTPD on my Ubuntu system, but it doesn’t seem to work properly.

In the config file i only changed the «local_enable», «write_enable» and «listen» to YES.

When I use «netstat -tanp» or similar commands they only show me «22:sshd» but nothing on port 21.

I tried restarting VSFTPD and i tried restarting my whole VPS. Reinstalling VSFTPD didn’t help either.

The weird thing was: Before i restarted my VPS for the first time it was listening on IPv6 Port21, but now it doesn’t even listen on that anymore.

I tried everything that google told me but nothing works. It’s a fresh installation of ubuntu 16.04.4, and vsftpd is version 3.0.3

(when i try to just type «vsftpd» into my console, it tells me «500 OOPS: ruin two copies of vsftpd for IPv4 and IPv6)

TL;DR: VSFTPD not listening on Port21, any tips why?

10 More Discussions You Might Find Interesting

1. Red Hat

Snmpd service failed to start on Red Hat 6

Dear community,

I got the following error when I try to start the snmpd service:
# service snmpd start
Starting snmpd: Log say:
Could someone help please?
Thank you
Lucas

———- Post updated at 08:07 AM ———- Previous update was at 07:50 AM ———-

DAMN!!!!… (2 Replies)

Discussion started by: Lord Spectre

2. Solaris

How to check FTP service failed in between on Solaris 10?

Hi Guys,

I need to check why FTP service on Solaris 10 machine did not work in between.

What does Jun-29 means here? Does it mean that it has been RUNNING/UP since Jun 29th ?

-bash-3.2$ sudo /usr/bin/svcs |grep -i ftp
legacy_run Jun_29 lrc:/etc/rc3_d/S90proftpd
online … (3 Replies)

Discussion started by: manalisharmabe

3. Red Hat

550 Failed to change directory from FireFTP to CentOS 5.7 VSFTPD

When trying to connect from Mozilla’s FireFTP using anonymous or a FTP user on the CentOS 5.7, using VSFTPD I get the following error:

550 Failed to change directory.(View Attachment)

This is what I have in my vsftpd.conf file:

# Example config file /etc/vsftpd/vsftpd.conf # # The default… (1 Reply)

Discussion started by: jastanle84

4. Red Hat

VSFTPD Service Failed to Start

Today I have installed VSFTPD but service is failing to start.

We have been using standard FTP successful but need to introduce an FTPS option.

I have run YUM install VSFTPD and everything appeared to load ok.
(If I run rpm — qa | grep vsftpd I get vsftpd-2.0.5-16.el5_4.1 which I… (4 Replies)

Discussion started by: PaulComins

5. AIX

Q: how to start a service when system start

As topic, assume we have a service called «blahservice»

and we can start it by:

startsrc -s blahservice

what is the best practice to run such command when system start?

— directly use mkitab to add it into /etc/inittab

or

— drop startup scripts in /etc/rc.d/rcX.d

I know they… (4 Replies)

Discussion started by: acerlinux

6. SuSE

How to start Apache2 and vsftpd at boot

My apache and ftp server is working fine but when I reboot the system ftp and web server is not running automatically. Please advise on how to start apache and ftp at boot. (9 Replies)

Discussion started by: real-chess

7. Shell Programming and Scripting

Need to start a script from the point where it failed.

Hi Guys,

I have requirement where if the script fails at a particular point, then the script should run from that particular point itslf..

could anyone help me out from this..

Thanks (5 Replies)

Discussion started by: mac4rfree

8. SuSE

vsftpd won’t start on SLES 10

I recently installed SLES 10 on an x86 64bit blade server. I then installed vsftpd from the suse cds through network services; however after configuring the vsftpd.conf file, the server fails to start:

# /etc/init.d/vsftpd start
Starting vsftpd startproc: exit status of parent of… (5 Replies)

Discussion started by: dave521

9. Solaris

tmchild exec service failed erron = 2

I have a Solaris-9 box. When I log into it I get the following error message
tmchild exec service failed erron = 2 . Any ideas !!

Thanks Mike (2 Replies)

Discussion started by: mbjyork

10. UNIX for Dummies Questions & Answers

Service + vsftpd

Hello,

I have two problems:

1. The service command does not work on my system! I mean when I enter:
service … start
I get: bash: service: command not found

2. I want to launch my vsftpd server. I tried to launch it using service command and you see that it didn’t work!

Please help… (1 Reply)

Discussion started by: HSN

I have to set up a FTP server on my machine. I have installed vsftpd using the command:

sudo apt-get install vsftpd

I then edited the configuration file vsftpd.conf in the location /etc. The file contains:

#Set the server to run in standalone mode
listen=YES

#Enable anonymous access
local_enable=NO
anonymous_enable=YES

#Disable write access
write_enable=NO

#Set root directory for anon connections
anon_root=/var/ftp

#Limit retrieval rate
anon_max_rate=2048000

#Enable logging user login and file transfers. /var/log/vsftpd.log
xferlog_enable=YES

#Set interface and port
listen_address=192.120.43.250
listen_port=21

The IP address 192.120.43.250 is the eth0 for my server. When I run the command

sudo vsftpd /etc/vsftpd.conf

I get the error:

500 OOPS: could not bind listening IPv4 socket

To check to see what was running on port 21, I ran the command:

sudo netstat -tulpn

And saw that vsftpd process id was 29383 so I issued the command:

sudo killserver 29383

And checked again. The vsftpd was still there, but with a different PID. Running the command:

sudo killall vsftpd

and

sudo killall -9 vsftpd

Does the same thing. I have already tried reinstalling. Anyone know what is going on and how to fix it?

Rahul's user avatar

Rahul

13.3k3 gold badges43 silver badges54 bronze badges

asked Feb 16, 2015 at 18:52

Alper Turan's user avatar

1

Remember to comment out

listen=YES

in your vsftpd.conf file so that you don’t run your vsftpd in standalone mode

It fixed the problem in my case.

Hunter.S.Thompson's user avatar

answered Mar 10, 2015 at 13:07

ARTURO's user avatar

You are getting this error probably because of xinetd ftp is running.

The procedure mentioned below will resolve the following errors:

A) 500 OOPS: could not bind listening IPv4 socket, for vsftpd

B) Server hangup immediately after connect, for ncftpget

Follow the procedure mentioned below to rectify the error:

  • To View which ftp service is running use:

    $ lsof -i | grep ftp (Become root and run this command)
    
  • To stop xinetd:

    $ sudo service xinetd stop
    
  • After stoping xinetd restart your vsftpd service by typing :

    $ /etc/init.d/vsftpd restart  (Become root and run this command)
    
  • Also check the vsftpd.conf with this one:

    listen=YES
    local_enable=YES
    write_enable=YES
    local_umask=022
    dirmessage_enable=YES
    use_localtime=YES
    xferlog_enable=YES
    secure_chroot_dir=/var/run/vsftpd/empty
    pam_service_name=vsftpd
    rsa_cert_file=/etc/ssl/private/vsftpd.pem
    

answered Dec 28, 2015 at 13:46

Ankit Raj's user avatar

Ankit RajAnkit Raj

1731 silver badge6 bronze badges

1

In my case the error was due to the process was running.

Try the next:

$ sudo service vsftpd restart

The service should restart with the new configuration parameters, if any.

answered Jul 25, 2016 at 11:56

Lorenzo Lerate's user avatar

If above solutions did not worked then you are in the same situation as I was in. Now let’s resolve it.

First make sure to do listen=NO or comment the line that contain listen=YES and must set the port to either 8081 or standard ports. Then type ps -ef then a whole bunch of things appear like :

enter image description here

Then you extract the file in which you are interested in by typing the command :

ps -ef | grep vsftpd

Now, remember the PID number is in second column. Now, copy that number. Now you need to kill the vsftpd beacause it contains previous log and you just modified something into the vsftpd.conf file. Kill command is :

sudo kill <PID>

Ex. sudo kill 5392

Now, You are done with it.Now restart the server it will run perfectly.

answered Feb 4, 2020 at 21:15

surya_bhai's user avatar

In my case, uncommentting the following line in vsftpd.conf solved the problem:

write_enable=YES

answered May 17, 2020 at 21:23

origami's user avatar

vsftpd defaults to Listen_ipv6=YES. If you have no IPv6 available and you run it manually to look at the error, like this

$ sudo /usr/sbin/vsftpd /etc/vsftpd.conf
500 OOPS: socket

If you set Listen=YES you turn on IPv4, then you get

$ sudo /usr/sbin/vsftpd /etc/vsftpd.conf
500 OOPS: run two copies of vsftpd for IPv4 and IPv6

So you set listen_ipv6=NO and you run it again and get no errors. So you should be able to ^C out of the manual run and start up the service, at least that worked for me.

answered Jan 31 at 23:24

cpu's user avatar

1

Maybe in the standalone mode,you have started the vsftpd service.And you just need to kill the vsftpd process,not need to change the config file.

answered Apr 29, 2018 at 4:50

wenyu jiang's user avatar

The error means your system already have a vsftpd runing.It seems like that vsftpd start from inetd.You should find out the pid of vsftpd with this command:

netstat -tulpn | grep vsftpd

And then kill the process:

kill <pid>

And restart vsftpd:

/usr/local/sbin/vsftpd &

That may work.I solved the problem in my case.

answered Dec 29, 2020 at 1:25

Kiopwias's user avatar

3

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

I will use vsftpd as a ftp server. I did all changes on /etc/vsftpd.conf.

These changes are (according to digitalocean):

anonymous_enable=NO
write_enable=YES
local_enable=YES
chroot_local_user=YES

More here: https://www.digitalocean.com/community/articles/how-to-configure-vsftpd-to-use-ssl-tls-on-an-ubuntu-vps

I’v also created a ssl certificate file. (not necessary but recommended)

Still getting :

500 OOPS: could not bind listening IPv4 socket

Note:

pam_service_name=vsftpd

Netstat:

netstat -pan|grep :21;
tcp        0      0 0.0.0.0:21 0.0.0.0:*               LISTEN      30694/vsftpd

asked Mar 5, 2014 at 9:23

Canser Yanbakan's user avatar

1

Much probably you have /etc/xinetd.d/ftp enabled AND pointing to /usr/sbin/vsftpd and in /etc/vsftpd.conf you have listen=YES.

Simply change it to listen=NO. The listen=YES is for standalone, if you want vsftpd to be always active then you’ll have to disabled it in the xinetd config.

Jawa's user avatar

Jawa

3,61913 gold badges32 silver badges36 bronze badges

answered Dec 27, 2014 at 23:16

ocsav's user avatar

ocsavocsav

112 bronze badges

you might need a LISTEN line:
LISTEN=YES

UPDATE: From your netstat result, it seems that the vsftpd is actually running and it is associated with 0.0.0.0:21. So port (21) on all interfaces. This might be a warning that one of the interfaces is not accepting the bind request. Can you test the ftp server? Do you get a directory listing?

UPDATE 2: Is SELinux activated? Can you please try to login as passive and as active and check if one works?… These things have a history with ftp. Another thing to look out for is whether the home directory of the user account used for login is actually owned by the user. vsftpd is very sensitive when it comes to permissions.

answered Mar 5, 2014 at 9:28

Ghassan's user avatar

GhassanGhassan

3362 silver badges4 bronze badges

3

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

Понравилась статья? Поделить с друзьями:
  • W210 ошибка b1755
  • Vscode eslint не подсвечивает ошибки
  • Vsc ошибка что значит
  • W210 ошибка b1010
  • Vsc ошибка тойота ярис