1 (06.01.2018 10:56:17 отредактировано caspar)

У меня был настроен 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 это невозможно?
*** Добавлено: 04.01.2018 13:18:01 ***

Может сменить программу FTP-сервера? Например на pro-ftpd ?? В какой программе возможен описанный режим работы?

Путь важнее цели.

2

Я использовал pure-ftpd, проблем нет. Насчёт анонимного юзера надо смотреть.

ᛈᚺ'ᚾᚷᛚᚢᛁ ᛗᚷᛚᚹ'ᚾᚨᚠᚺ ᚲᛏᚺᚢᛚᚺᚢ ᚱ'lᚷᛖᚺ ᚹᚷᚨᚺ'ᚾᚨᚷᛚ ᚠᚺᛏᚨᚷᚾ

Asus Prime B460M-K, i5-10500, Intel 630 UHD, DDR4 32 GB, SSD 500GB + HDD 2TB | Linux Mint 21.3 Cinnamon + Fedora 39 MATE (Compiz) + Windows 11 + macOS 12 Monterey

3

Rizado пишет:

Насчёт анонимного юзера надо смотреть.

Так вот это-то как раз и не работает.

Путь важнее цели.

4

caspar, как насчёт этой инструкции?
https://www.skleroznik.in.ua/2014/03/06 … na-centos/
Это не на Debian, но конфиги отличаться практически не будут.

ᛈᚺ'ᚾᚷᛚᚢᛁ ᛗᚷᛚᚹ'ᚾᚨᚠᚺ ᚲᛏᚺᚢᛚᚺᚢ ᚱ'lᚷᛖᚺ ᚹᚷᚨᚺ'ᚾᚨᚷᛚ ᚠᚺᛏᚨᚷᚾ

Asus Prime B460M-K, i5-10500, Intel 630 UHD, DDR4 32 GB, SSD 500GB + HDD 2TB | Linux Mint 21.3 Cinnamon + Fedora 39 MATE (Compiz) + Windows 11 + macOS 12 Monterey

5

Rizado, спасибо, попробую в виртуалке.
*** Добавлено: 06.01.2018 11:06:36 ***

РЕШЕНО. Опишу, может кому еще пригодится.
Дело было не в vsftpd.conf, а во владельце каталога /srv/ftp/
Не помню из каких соображений я сменил владельца этого каталога с root на ftp. Доступ anonimous'а осуществляется от имени ftp.
А vsftpd не выполняет chroot в каталог, в котором разрешена запись. стоило вернуть каталог root'у и нормальная работа возобновилась.

Путь важнее цели.