Настройка Proftpd c acl доступом

Есть и такой ОС.

Модератор: weec

Правила форума
Убедительная просьба юзать теги [cоde] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Demontager
ефрейтор
Сообщения: 68
Зарегистрирован: 2011-06-27 23:11:48
Откуда: Украина
Контактная информация:

Настройка Proftpd c acl доступом

Непрочитанное сообщение Demontager » 2011-07-11 12:20:33

У меня проблема с работой Proftpd совместно с acl. Если acl при сборке отключить, то всё нормально, но я именно хочу использовать acl для блокировки нежелательных IP.
У меня работает доступ с acl от пользователя, но не работает от Anonymous. Вот это в логах соединения:

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


Status:	Connecting to 192.168.56.1:21...
Status:	Connection established, waiting for welcome message...
Response:	220 ProFTPD 1.3.3e Server (ProFTPD Gentoo Server) [192.168.56.1]
Command:	USER anonymous
Response:	331 Anonymous login ok, send your complete email address as your password
Command:	PASS **************
Response:	530-Unable to set anonymous privileges.
Response:	530 Login incorrect.
Error:	Critical error
Error:	Could not connect to server
Когда acl флаг выключен, то anonymous подключается нормально и попадает в /home/ftp:

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


Status:	Connecting to 192.168.56.1:21...
Status:	Connection established, waiting for welcome message...
Response:	220 ProFTPD 1.3.3e Server (ProFTPD Gentoo Server) [192.168.56.1]
Command:	USER anonymous
Response:	331 Anonymous login ok, send your complete email address as your password
Command:	PASS **************
Response:	230 Anonymous access granted, restrictions apply
Command:	OPTS UTF8 ON
Response:	200 UTF8 set to on
Status:	Connected
Status:	Retrieving directory listing...
Command:	PWD
Response:	257 "/" is the current directory
Command:	TYPE I
Response:	200 Type set to I
Command:	PASV
Response:	227 Entering Passive Mode (192,168,56,1,151,22).
Command:	MLSD
Response:	150 Opening ASCII mode data connection for MLSD
Response:	226 Transfer complete
Status:	Directory listing successful
Вот сам конфиг proftpd.conf

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

ServerName "ProFTPD Gentoo Server"
ServerType standalone
DefaultServer on
RequireValidShell off
AuthPAM off
AuthPAMConfig ftp

# Listen on the standard FTP port 21.
Port 21

# New directories and files should not be group or world writable.
Umask 022

# To prevent DoS attacks set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once simply increase this value.
MaxInstances 30

# The server will run under ftp/ftp.
User ftp
Group ftp

# Every FTP sessions is "jailed" into the user's home directory.
DefaultRoot ~

# Generally files are overwritable.
AllowOverwrite on

# Disallow the use of the SITE CHMOD command.
<Limit SITE_CHMOD>
  DenyAll
</Limit>

# A basic anonymous FTP account without an upload directory.
<Anonymous ~ftp>
  User ftp
  Group ftp

  # Clients can login with the username "anonymous" and "ftp".
  UserAlias anonymous ftp

  # Limit the maximum number of parallel anonymous logins to 10.
  MaxClients 10

  # Prohibit the WRITE command for the anonymous users.
  <Limit WRITE>
    DenyAll
  </Limit>
</Anonymous>

<Limit LOGIN>
    # These are trusted addresses
    Allow from 192.168.56.3
    Allow from trusted-domain.com

    # Everyone else is denied
    DenyAll
  </Limit>
Права на /home/ftp:

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

drwxrwxr-x 2 ftp  ftp  4096 Feb 28 12:54 ftp

Система: Gentoo amd64
Proftpd собран так:

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

[ebuild   R   ] net-ftp/proftpd-1.3.3e  USE="acl authfile ban caps ctrls ident ldap mysql ncurses nls pam ratio readme rewrite sftp shaper sitemisc softquota ssl tcpd -case -clamav -deflate -doc -exec -hardened -ifsession -ipv6 -kerberos -postgres -radius (-selinux) -trace -vroot -xinetd" 0 kB

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35420
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

Re: Настройка Proftpd c acl доступом

Непрочитанное сообщение Alex Keda » 2012-01-10 0:21:02

добрые линуксоиды забили на этот вопрос =)
Убей их всех! Бог потом рассортирует...

Demontager
ефрейтор
Сообщения: 68
Зарегистрирован: 2011-06-27 23:11:48
Откуда: Украина
Контактная информация:

Re: Настройка Proftpd c acl доступом

Непрочитанное сообщение Demontager » 2012-01-10 0:53:22

Нет, не забили, вопрос решён, я нашёл причину, забыл отписаться тут, сорри. Не сочтите за рекламу. но вот тут http://nixtalks.com/proftpdacl отписал подробнее.