Ftpfs ошибка регистрации пользователя anonymous

Доброго времени суток!

Ранее я настраивал ftp на VPS и сохранял все команды для повторной настройки. Но ftp сервер на этот раз не хочет даже авторизировать а если авторизирует локального пользователя то говорит что «нет доступа к этой папке» или «сервер ftp не дал ответа». Я использую такие команды:

sudo mkdir /home/www
sudo mkdir /home/www/file
sudo mkdir /home/www/node
sudo mkdir /var/www
sudo mkdir /var/www/node
sudo chown -R root:rootgroup /home/www/file
sudo chmod 775 /home/www/file
sudo chown -R root:rootgroup /home/www/node
sudo chmod 775 /home/www/node
sudo chown -R root:rootgroup /var/www/node
sudo chmod 775 /var/www/node
sudo chmod a-w /home/www

/home/www — Общий каталог

/home/www/node — файлы сайта (в эту папку монтируется каталог /var/www/node)

/home/www/file — хранение некоторых данных.

При авторизации пользователей с группы rootgroup он должен получить доступ к созданию папок и файлов в папках file и node и удалению всего не считая эти каталоги.

Файл конфигурации:

listen=YES

anonymous_enable=NO

local_enable=YES

write_enable=YES

chroot_local_user=YES

local_root=/home/www

pasv_min_port=40000

pasv_max_port=50000

В /etc/shadow пользователи под которыми я пытаюсь залогиниться имеются.

Помогите с настройкой ftp. Буду очень благодарен!

I configured my ftp user’s home dir to /var/www and set a password but I cannot login with ftp 127.0.0.1, it keep giving me 530 Login incorrect. Why is this? I’m sure I have typed the password right.

edit 1
My config /etc/vsftpd.conf looks like:

# 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
#
# Run standalone with IPv6?
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one. This parameter and the listen parameter are mutually
# exclusive.
#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
# This option specifies the location of the RSA key to use for SSL
# encrypted connections.
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

allow_writeable_chroot=YES

and permissions are set to 777:

reg@regDesktopHome:~$ ls -ld /var/www/
drwxrwxrwx 11 root root 4096 Feb 19 20:42 /var/www/

And the log file at /var/log/vsftp.log only says:

Tue Feb 25 21:19:38 2014 [pid 18250] CONNECT: Client "127.0.0.1"
Tue Feb 25 21:19:46 2014 [pid 18249] [ftp] FAIL LOGIN: Client "127.0.0.1"

Oh and syslog-ng doesn’t say anything at /var/log/messages

I can’t get vsfptd working on Ubuntu 12.04.

my vsftpd.conf file looks like this, and I try to connect with a local user:

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

Error message in FileZilla:

Response:   331 Please specify the password.
Command:    PASS ****
Response:   530 Login incorrect.

asked Jan 31, 2014 at 18:03

Florian's user avatar

FlorianFlorian

8021 gold badge6 silver badges9 bronze badges

4

Back up the config file before making a change;

sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.back

and then edit vsftpd.conf (with vi or nano)

nano /etc/vsftpd.conf

Then make the following change

pam_service_name=ftp

Save your change and restart the ftp server (if you use nano hit CTRL+O & enter to save then CTRL+X to exit)

sudo service vsftpd restart

Source: VSFTPD configuration problems with 12.04

Community's user avatar

answered Jan 31, 2014 at 18:35

AzkerM's user avatar

AzkerMAzkerM

10k6 gold badges30 silver badges51 bronze badges

9

By default vsFTPd uses the file /etc/pam.d/vsftpd.
This file by default requires FTP users to have a shell listed in /etc/shells and requires them not to be listed in /etc/ftpusers.
If you check those 2 things your probably find what the problem is.

answered Sep 4, 2015 at 14:45

Jeroen Vermeulen - MageHost's user avatar

4

I did not need to change the vsftpd.conf. Only needed to make sure that a shell was set in my /etc/passwd file, that also was lited in /etc/shells.

So basically after useradd without a shell I needed to make sure the home directory was created and that the user had /bin/bash as it’s shell.

galoget's user avatar

galoget

2,9032 gold badges20 silver badges24 bronze badges

answered Oct 31, 2015 at 11:49

Duncan's user avatar

DuncanDuncan

811 silver badge2 bronze badges

1

I met this problem when I tried to login in with root and I just solved it.

vsftpd: version 3.0.2

Solution:

Check the following file (it contains list of users disallowed FTP access):

/etc/ftpusers 

ftpusers

In my case, I commented out root from the file, then it worked.

galoget's user avatar

galoget

2,9032 gold badges20 silver badges24 bronze badges

answered Dec 3, 2015 at 8:27

2

Please make some changes in /etc/vsftpd.conf:

pam_service_name=ftp

If you want to set access by default /var/www directory for local user you can do that with below line:

local_root=/var/www

Now save and exit.

Restart vsftpd server using:

sudo service vsftpd restart

galoget's user avatar

galoget

2,9032 gold badges20 silver badges24 bronze badges

answered Sep 7, 2015 at 9:05

Jayesh Kalkani's user avatar

1

The suggested resolution did not work for me. I gave up on the ftp user, and switched my attention to the ubuntu user. I made sure there was a password associated with the ubuntu user.

I made sure to enable passive mode, and set local_enable=YES in the vsftpd.conf file.

I was able to authenticate just fine using the ubuntu account. And I successfully uploaded a large file to my Amazon Ubuntu FTP server. Clearly there was something amiss with the ftp user.

Ron's user avatar

Ron

20.2k6 gold badges55 silver badges72 bronze badges

answered May 6, 2015 at 5:02

richardm's user avatar

I used Ubuntu 18.04 and LetsEncrypt certificates for TLS encryption. What worked was changing the name of the pam_service_name=ftp
the error I was getting in Filezilla was:

"GnuTLS error -15": An unexpected TLS packet was received.

Reference: FTPS set up in ubuntu 18.04

galoget's user avatar

galoget

2,9032 gold badges20 silver badges24 bronze badges

answered Aug 27, 2019 at 5:37

Andre Leon Rangel's user avatar

Добрый день.

Ситуация следующая:
1. Есть девайс http://en.wikipedia.org/wiki/MyBook с установленным внутри

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

# uname -a
Linux MyBook 2.6.17.14 #1 PREEMPT Fri Jan 18 10:40:25 GMT 2008 armv5tejl GNU/Linux

На этот девайс необходимо поставить ftp, мой выбор пал на sftpd.

2. Необходимо предоставить доступ для системных пользователей, точнее сказать для пользователя ftp:

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

# id ftp
uid=108(ftp) gid=500(users) groups=500(users)

Конфиг:

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

# vi /opt/etc/vsftpd.conf
listen=NO
listen_address=10.200.0.48
pam_service_name=vsftpd
anonymous_enable=NO
local_enable=YES
write_enable=YES
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
anon_root=/var/ftp/anonymous
dirmessage_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=ftp
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
idle_session_timeout=600
data_connection_timeout=12000
nopriv_user=ftp
ascii_upload_enable=NO
ascii_download_enable=NO
ftpd_banner=Hello.
user_config_dir=/etc/vsftpd/vusers
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
userlist_file=/etc/vsftpd/user_list
userlist_enable=YES
userlist_deny=NO

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

]# cat /etc/vsftpd/vusers/ftp
local_root=/shares/internal/backup

При коннекте на данный фтп происходит следующее:

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

# ftp ftp@10.200.0.48
Connected to 10.200.0.48.
220 Hello.
331 Please specify the password.
Password:
530 Login incorrect.
ftp: Login failed.

Логи системы:

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

# tail /var/log/vsftpd.log
Tue Feb 22 14:18:15 2011 [pid 5922] CONNECT: Client "10.200.0.1"
Tue Feb 22 14:18:18 2011 [pid 5921] [ftp] FAIL LOGIN: Client "10.200.0.1"

Прошу помочь разобраться, т.к. не понимаю причину отказа авторизации.

I also ran into the same strange behaviour where a FTP-User configured with

# finger <user>
Login: <user>                   Name: 
Directory: /home/user-dir           Shell: /sbin/nologin
Never logged in.
No mail.
No Plan.

on one System is able to log in and on the other not.

In extention to the Answer of @KateYoak it turned out that the /etc/shells File was different and did not include the /sbin/nologin shell.
which made the PAM Authentication in /etc/pam.d/vsftpd

auth       required     pam_shells.so

fail

By just adding to the /etc/shells File the missing lines

/sbin/nologin
/usr/sbin/nologin

the check in /etc/pam.d/vsftpd worked.

So a working /etc/shells File should have:

# cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/usr/bin/sh
/usr/bin/bash
/usr/sbin/nologin
/bin/tcsh
/bin/csh

In more recent Versions (Centos8) the /etc/shells only contains:

# cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/sh
/usr/bin/bash

and User Accounts in those Systems are created with the /usr/bin/false Shell:

# cat /etc/passwd|grep -i ftp_user01
ftp_user01:x:1004:1004:FTP Account for user01:/home/user01:/usr/bin/false

Even though this configuration will not give automatically FTP Login what way.

$ ftp ftp-server02.domain.com
Connected to ftp-server02.domain.com (ip.add.re.ss).
220 FTP Service of Server ftp-server02
Name (ftp-server02.domain.com:local_user02): ftp_user01
331 Password required for ftp_user01
Password:
530 Login incorrect.
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.

It is always required to insert /usr/bin/false into /etc/shells
So the Minimum Configuration to get the FTP working should be:

# cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/sh
/usr/bin/bash
/usr/bin/false

Site Note about the thought from @Greeso :

The man pages on /sbin/nologin explain:
man page nologin:

nologin displays a message that an account is not available and exits non-zero. It is intended as a replacement shell field to deny
login access to an account.
nologin is a per-account way to disable login (usually used for
system accounts like http or ftp).

So actually running the /usr/sbin/nologin Command it displays:

$ /usr/sbin/nologin ; echo "res: '$?'"
This account is currently not available.
res: '1'

So bots that try a bruteforce attack on the system and get this message can use it to conclude that the Account exists in the System and that the Login is for a FTP or HTTP Service.
So you can understand the change as a strategy to harden the System Security.

I also ran into the same strange behaviour where a FTP-User configured with

# finger <user>
Login: <user>                   Name: 
Directory: /home/user-dir           Shell: /sbin/nologin
Never logged in.
No mail.
No Plan.

on one System is able to log in and on the other not.

In extention to the Answer of @KateYoak it turned out that the /etc/shells File was different and did not include the /sbin/nologin shell.
which made the PAM Authentication in /etc/pam.d/vsftpd

auth       required     pam_shells.so

fail

By just adding to the /etc/shells File the missing lines

/sbin/nologin
/usr/sbin/nologin

the check in /etc/pam.d/vsftpd worked.

So a working /etc/shells File should have:

# cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/usr/bin/sh
/usr/bin/bash
/usr/sbin/nologin
/bin/tcsh
/bin/csh

In more recent Versions (Centos8) the /etc/shells only contains:

# cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/sh
/usr/bin/bash

and User Accounts in those Systems are created with the /usr/bin/false Shell:

# cat /etc/passwd|grep -i ftp_user01
ftp_user01:x:1004:1004:FTP Account for user01:/home/user01:/usr/bin/false

Even though this configuration will not give automatically FTP Login what way.

$ ftp ftp-server02.domain.com
Connected to ftp-server02.domain.com (ip.add.re.ss).
220 FTP Service of Server ftp-server02
Name (ftp-server02.domain.com:local_user02): ftp_user01
331 Password required for ftp_user01
Password:
530 Login incorrect.
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.

It is always required to insert /usr/bin/false into /etc/shells
So the Minimum Configuration to get the FTP working should be:

# cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/sh
/usr/bin/bash
/usr/bin/false

Site Note about the thought from @Greeso :

The man pages on /sbin/nologin explain:
man page nologin:

nologin displays a message that an account is not available and exits non-zero. It is intended as a replacement shell field to deny
login access to an account.
nologin is a per-account way to disable login (usually used for
system accounts like http or ftp).

So actually running the /usr/sbin/nologin Command it displays:

$ /usr/sbin/nologin ; echo "res: '$?'"
This account is currently not available.
res: '1'

So bots that try a bruteforce attack on the system and get this message can use it to conclude that the Account exists in the System and that the Login is for a FTP or HTTP Service.
So you can understand the change as a strategy to harden the System Security.

У меня был настроен FTP-сервер, на который локальные пользователи могли заходить по имени/паролю и имели доступ ко всему дереву в соответствии со своими правами, а анонимные пользователи получали доступ без пароля (только на чтение) к каталогу /srv/ftp/
Некоторое время назад (точнее не вспомню), мне начали жаловаться, что при попытке анонимного доступа запрашивается имя/пароль и доступ получить не удается. Видимо это произошло после очередного обновления.

Технические подробности:

uname -a
Linux caspar-gate 3.2.0-4-686-pae #1 SMP Debian 3.2.96-2 i686 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.11 (wheezy)
Release: 7.11
Codename: wheezy

dpkg -l | grep vsftpd
ii  vsftpd                                2.3.5-3                            i386         lightweight, efficient FTP server written for security

Внимательно почитал man vsftpd.conf , попытался изменить /etc/vsftpd.conf , чтобы добиться желаемого поведения, но попытки не дали желаемого результата.

В настоящее время, после ряда попыток достичь желаемого режима работы, /etc/vsftpd.conf имеет вид (оставлены только незакомментированные параметры и часть комментариев):

##########################
# Run standalone?  vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=YES
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
# This option represents a directory which vsftpd will try to change into after an anonymous login. Failure is silently ignored
# anon_root=/srv/ftp/
# When enabled, this prevents vsftpd from asking for an anonymous password - the anonymous user will log straight in
no_anon_password=YES
#
# 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
#
# 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
#
# 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
#
# 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/private/vsftpd.pem

##########################

У меня подозрение, что значение какого-то параметра блокирует работу параметра «no_anon_password=YES»

Вопрос: как добиться желаемого режима работы, или в этой версии vsftpd это невозможно?

Привет форум!
Не получается настроить vsftpd чтобы он хотя бы анонимуса пускал…При настройке использовались документы:
http://wiki.ru.unix-like.info/%D0%A3%D1%81…BA%D0%B0_vsftpd

http://www.lissyara.su/?id=1454

http://www.linuxcenter.ru/lib/articles/sof…tpd_setup.phtml

Конфиг сервера такой:

Код:

~$ cat /etc/vsftpd.conf
# Примерный конфиг /etc/vsftpd.conf
#
#
#listen=YES #запускается без использования xinetd.
#listen_address=172.16.23.125 #привязка к ip и порту.
#listen_port=30005
anonymous_enable=YES #разрешаем вход анонимусам.
local_enable=YES #разрешаем вход локальным пользователям.
write_enable=YES #разрешаем выполнение команд STOR, DELE, RNFR, RNTO, MKD, RMD, APPE and SITE.
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES #даем анонимусам право записи и т.п.
#у анонимов пароль спрашивать не будем
no_anon_password=YES
#директория нашей помойки (если пользователь присутствует)
anon_root=/home/ftp/
#используем родное время, а не GMT
use_localtime=YES
dirmessage_enable=YES #показывать сообщение при первом входе в каталог.
connect_from_port_20=YES
chown_uploads=YES #изменять владельца загуржаемых файлов
chown_username=andrew #собственно указывается новый владелец
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
idle_session_timeout=600
data_connection_timeout=120
nopriv_user=nobody
ascii_upload_enable=NO
ascii_download_enable=NO
ftpd_banner=Welcome to FTP server.
convert_charset_enable=YES #включаем перекодировку
local_charset=UTF8 #локаль сервера
remote_charset=WIN1251 #локаль клиента
user_config_dir=/etc/vsftpd/vusers #указываем директорию с конфигурациями наших пользователей
chroot_local_user=YES #чрутим локальных пользователей в их домашний каталог
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
userlist_file=/etc/vsftpd/user_list #список пользователей которым позволено подключаться к серверу
userlist_enable=YES # сами
userlist_deny=NO # правила

Все порты проброшены на роутере и в файрволе (порты 20 и 21).
При соединении через filezilla с этого же компа с пустым паролем получаю:

Статус: Соединяюсь с 79.126….
Статус: Соединение установлено, ожидание приглашения…
Ответ: 220 tc FTP version 1.0 ready at Sat Mar 18 04:09:02 2000
Команда: USER anonymous
Ответ: 331 Enter PASS command
Команда: PASS **************
Ответ: 530 User anonymous cannot log in.
Ошибка: Не могу соединиться!

Уже и конфиг как только не менял и чего только не химичил….Не знаю куда дальше копать, подскажите пожалуйста кто сможет :)

Не могу разобраться в настройках сервера  :-[

Вот конфиг vsftpd.conf

# ———— Настрйоки для анонимного сервера

# Запускаем как демон, а не из inetd.
listen=YES
background=YES

# Если сервер публичный, пускающий анонимных пользователей
anonymous_enable=YES
ftp_username=nobody
no_anon_password=YES

# Корень анонимного ftp архива
anon_root=/mnt/opt/ftp
anon_umask=0000

# Запрещаем анонимным пользователям запись данных, если нужно разрешить
# запись для локальных пользовтелей (write_enable=YES)
anon_upload_enable=YES

# Запрещаем создавать директории.
anon_mkdir_write_enable=YES

# Запрещаем переименовывать и удалять
anon_other_write_enable=YES

# Если нужно запретить доступ к определенным типам файлов по маске
# deny_file={*.mp3,*.mov, *.avi, .filelist}

# Если нужно скрыть определенные типы файлов при выводе списка,
# но дать скачать тем кто знает точное имя.
# hide_file={*.mp3,*.mov, *.avi}

# Если анонимную закачку необходимо разрешить, нужно дополнительно
# использовать chown_uploads=YES и chown_username=ftp_anon_user

# Если нужно пускать анонимных пользователей только при правильном введении
# email (аналог паролей для ограничения доступа к публичному ftp), заданного в
# файле определенном директивой email_password_file, нужно установить
# secure_email_list_enable=YES

# Активируем список пользователей которым запрещен вход по FTP (например, root)
userlist_enable=YES
userlist_file=/etc/vsftpd/vsftpd.user_list

# приветствие
ftpd_banner=Welcome to Aleks FTP Server

# Включаем ведение лога операций.
xferlog_enable=YES
vsftpd_log_file=/var/log/vsftpd.log

# Расширенные логи всех команд
#log_ftp_protocol=YES

# Разрешает или запрещает вход для локальных пользователей. Если включено
# обычные пользовательские акаунты в /etc/passwd могут быть использованы для входа.
# Должно быть включено для разрешения любых не анонимных входов, включая вход
# виртуальных пользователей.
local_enable=YES

# Разрешает FTP команды изменяющие файловую систему. Такие команды как:
# STOR,  DELE,  RNFR, RNTO, MKD, RMD, APPE, SITE.
write_enable=YES

# Значение маски назначения прав доступа к файлам созданным локальными
# пользователями. Помните! Если вы хотите указать параметр в качестве
# цифрового значения, указывайте «0» (нулевую) приставку, иначе
# значение будет определено как целое десятизначное.
local_umask=0000

# Таймаут в секундах, для ответа клиента на команду PORT.
# По умолчанию: 60.
connect_timeout=0
idle_session_timeout=0
accept_timeout=0

# Таймаут в секундах, который является максимальным значением, приема данных
# без прогресса. Если таймаут срабатывает, удаленный клиент сбрасывается.
# По умолчанию: 300
data_connection_timeout=0

# опция задает максимальное количество клиентов, которое может быть подключено.
# По умолчанию: 0 (неограничено)
max_clients=0

# опция задает максимальное количество клиентов, которое может быть подключено
# из одного адреса
# По умолчанию: 0 (неограничено)
max_per_ip=0

# Максимально разрешенная скорость передачи данных, в байтах в
# секунду, для анонимных пользователей.
# По умолчанию: 0 (неограничено)
anon_max_rate=0

Вот результат при попытке подключиться:
Статус:   Соединение установлено, ожидание приглашения…
Ответ:   220 Welcome to Aleks FTP Server
Команда:   USER anonymous
Ответ:   500 OOPS: cannot change directory:/nonexistent

Локальные пользователи подключаются без проблем!


Пользователь решил продолжить мысль 24 Марта 2010, 11:24:32:


??? Смотрю подобное сообщение появилось, а ответа нет …  :-\

Помогите пожалуйста запустить ftp-сервер через alterator-vsftpd.

Есть свежеустановленный 6.0.0 Centaurus с установленным же alterator-vsftpd.
ip компьютера 192.168.4.105
В веб интерфейсе альтератора в разделе ftp-сервер установленны _все_ галочки, в параметрах локальных пользователей пользователь user добавлен, доступ на запись есть, кнопки «ОК» нажаты, компьютер перезагружен. После перезагрузки от рута выполнено (да, уже паранойя):
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P INPUT ACCEPT
Запускаем на этом компьютере mc и успешно устанавливаем ftp-соединение: user@127.0.0.1
А вот если пытаемся установить ftp-соединение user@192.168.4.105, то mc выдаёт сообщение: «ftpfs: ошибка регистрации пользователя user»
 При попытке зайти с TotalCommander(a) со сторонней win машины выпадает мгновенный ответ: «Сервер не отвечает (время ожидания истекло)».
Анонимное соединение отрабатывается точно также: 127.0.0.1 — соединение устанавливается; 192.168.4.105 — «ftpfs: ошибка регистрации пользователя anonymous».
Что это — ошибка альтератора или я чего-то не включил?

« Последнее редактирование: 18.02.2012 10:45:23 от XBM »


Записан



Записан


[root@localhost /]# netlist | grep LIST
root     4296  cupsd    8 tcp       127.0.0.1:631           0.0.0.0:0     LISTEN
root     4244  xinetd   5 tcp         0.0.0.0:21            0.0.0.0:0     LISTEN
root     4522  ahttpd  12 tcp         0.0.0.0:8080          0.0.0.0:0     LISTEN
[root@localhost /]# control
at              public          (public restricted atdaemon)
cdrdao          public          (public restricted)
cifsmount       public          (public wheelonly restricted)
cifsumount      public          (public wheelonly restricted)
consolehelper   public          (public wheelonly restricted)
crontab         public          (public restricted)
cups            server          (server local)
dvd-ram-control public          (public restricted legacy)
dvd+rw-booktype public          (public restricted legacy)
dvd+rw-format   public          (public restricted legacy)
dvd+rw-mediainfo public          (public restricted legacy)
fusermount      unknown         (public wheelonly restricted)
gdm_xdmcp       disabled        (enabled disabled)
gpasswd         restricted      (public wheelonly restricted)
growisofs       public          (public restricted legacy)
iftop           netadmin        (public netadmin restricted)
mount           public          (public wheelonly unprivileged restricted)
newgrp          restricted      (public wheelonly restricted)
nfsmount        restricted      (public wheelonly restricted)
ntpd            client          (server client)
pam_mktemp      enabled         (enabled disabled)
passwd          tcb             (tcb traditional restricted)
passwdqc-enforce users           (everyone users)
ping            public          (public netadmin restricted)
ping6           public          (public netadmin restricted)
pmount          restricted      (public xgrp restricted)
ppp             traditional     (restricted traditional uucp public)
readom          public          (public restricted)
rpcbind         local           (server local)
sftp            enabled         (enabled disabled)
find: `/usr/sbin/smbmnt': Нет такого файла или каталога
find: `/usr/bin/smbumount': Нет такого файла или каталога
smbmount        unknown         (public wheelonly restricted)
sshd-allow-groups disabled        (enabled disabled)
sshd-password-auth default         (enabled disabled default)
su              wheelonly       (public wheel wheelonly restricted)
sudo            wheelonly       (public wheelonly restricted)
sudoers         strict          (strict relaxed)
system-auth     local           (krb5 ldap local multi pkcs11)
tcb_chkpwd      tcb             (traditional tcb restricted)
wodim           public          (public restricted)
write           public          (public restricted)
xdg-user-dirs   enabled         (enabled disabled)
xorg-server     public          (public xgrp restricted)
[root@localhost /]#
вероятно, надо
sftp            enabled         (enabled disabled)
изменить на
sftp            enabled         (enabled enabled) ?

« Последнее редактирование: 18.02.2012 10:48:02 от XBM »


Записан


#cd /etc/xinetd.d/

#cat <то что связано с ftp>


Записан


# default: off
# description: The vsftpd FTP server.
service ftp
{
disable = no
socket_type = stream
protocol = tcp
wait = no 
user = root
nice = 10
rlimit_as = 100M
server = /usr/sbin/vsftpd
# server_args =
}


Записан


добавте

only_from       += ип с которого надо


Записан


Спасибо, Andrey.
Добавил only_from = 0.0.0.0 — заработало.
Но «(решено)» писать не буду, т.к. просят найти линуксовую сборку шлюза с настройкой без использования командной строки.

Попутно нашел в багзилле ошибку  (2007г.)  #12182  — «добавить рычаги для only_from». Она в сотоянии «CLOSED FIXED».
Может, есть смысл её переоткрыть?

Кто-нибудь знает: есть в планах добавить в alterator-vsftp возможность управлять виртуальными пользователями vsftp?


Записан


Кто-нибудь знает: есть в планах добавить в alterator-vsftp возможность управлять виртуальными пользователями vsftp?

Повешайте запрос на пакет в багзиллу.


Записан

Андрей Черепанов (cas@)


#26966

А на «only_from» в alterator-vsftpd надо ошибку открывать?


Записан


А на «only_from» в alterator-vsftpd надо ошибку открывать?

Да. И лучше отдельной.


Записан

Андрей Черепанов (cas@)



Записан


Понравилась статья? Поделить с друзьями:
  • Funkschlussel batt ошибка
  • Ftp сервер ошибка 530
  • Ftp ошибка при открытии локального файла
  • Fuel игра ошибка
  • Fusion ошибка абс