The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]



"Доступ к FTP-серверу (vsftpd) по паролю и анонимный."
Вариант для распечатки  
Пред. тема | След. тема 
Форум Открытые системы на сервере (FTP / Linux)
Изначальное сообщение [ Отслеживать ]

"Доступ к FTP-серверу (vsftpd) по паролю и анонимный."  +/
Сообщение от Eugene email(ok) on 03-Янв-18, 18:19 
У меня был настроен 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 это невозможно?

Ответить | Правка | Cообщить модератору

Оглавление

Сообщения по теме [Сортировка по времени | RSS]


1. "Доступ к FTP-серверу (vsftpd) по паролю и анонимный."  +/
Сообщение от Eugene email(ok) on 04-Янв-18, 13:20 
Может сменить программу FTP-сервера? Например на pro-ftpd ?? В какой программе возможен описанный режим работы?
Ответить | Правка | ^ к родителю #0 | Наверх | Cообщить модератору

2. "(РЕШЕНО) Доступ к FTP-серверу (vsftpd) по паролю и анонимный."  +/
Сообщение от Eugene email(ok) on 06-Янв-18, 11:10 
РЕШЕНО. Опишу, может кому еще пригодится.
Дело было не в vsftpd.conf, а во владельце каталога /srv/ftp/
Не помню из каких соображений я сменил владельца этого каталога с root на ftp. Доступ anonimous'а осуществляется от имени ftp.
А vsftpd не выполняет chroot в каталог, в котором разрешена запись. стоило вернуть каталог root'у и нормальная работа возобновилась.
Ответить | Правка | ^ к родителю #1 | Наверх | Cообщить модератору

Архив | Удалить

Рекомендовать для помещения в FAQ | Индекс форумов | Темы | Пред. тема | След. тема




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру