View previous topic :: View next topic |
Author |
Message |
burbulator n00b

Joined: 18 May 2007 Posts: 22 Location: Tomsk
|
Posted: Mon May 21, 2007 5:37 am Post subject: Проблема с FTP (proftpd) |
|
|
Два месяца назад, я установил proftpd, натроил и всё работало. Но появилась острая необходимость поставить Apache. Я обновил систему до "текущей" и поставил apache (emerge --sync && emerge --depclean && emerge -uD world && emerge apache). Поставился apache-2.0.58. Но появилась проблема, мой FTP перестал пускать анонимных пользователей , "реальных" пользователей он попрежнему пускает.
Вот мой конфиг proftpd:
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anonymous access.
ServerName "PUBLIC FTP SERVICE"
ServerType standalone
DefaultServer on
RequireValidShell off
#AuthPAM on
#AuthPAMConfig ftp
UseReverseDNS off
# Port 21 is the standard FTP port.
Port 21
# Allow FTP resuming.
# Remember to set to off if you have an incoming ftp for upload.
AllowStoreRestart on
# Use the IANA registered ephemeral port range
PassivePorts 50000 60000
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and 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. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit the maximum number of processes per service
# (such as xinetd).
MaxInstances 30
# Set the user and group under which the server will run.
User nobody
Group nogroup
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~
# Needed for NIS.
#PersistentPasswd off
# Normally, we want files to be overwriteable.
<Directory /home/ftp>
AllowOverwrite on
</Directory>
# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>
<IfModule mod_clamav_new.c>
# Enable virus scanning and removal
ClamAV on
# Specify the UNIX Local Socket
#ClamLocalSocket /tmp/clamd
ClamLocalSocket /var/run/clamav/clamd.sock
</IfModule>
SyslogLevel notice
TransferLog /var/log/proftpd/proftpd-tranfer.log
SystemLog /var/log/proftpd/proftpd-error.log
ExtendedLog /var/log/proftpd/proftpd-extended.log read,write
# A basic anonymous configuration, with no upload directories.
# All files uploaded are set to username.usergroup ownership
<Anonymous ~ftp>
AnonRequirePassword off
User ftp
Group ftp
DirFakeMode 0640
DirFakeUser On 3000
DirFakeGroup On 3000
# We want clients to be able to login with "anonymous" as well as "ftp".
UserAlias anonymous ftp
# Limit the maximum number of anonymous logins.
MaxClients 10 "Sorry, max %m users - try again later"
MaxClientsPerHost 2 "Sorry, max %m clients from any host is already connected"
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
#DisplayLogin welcome.msg
#DisplayFirstChdir .message
# Limit WRITE everywhere in the anonymous chroot.
<Limit WRITE>
DenyAll
</Limit>
<Directory incoming>
<Limit READ STOR CWD MKD>
AllowAll
</Limit>
# Deny Remove Directory(RMD) and Delete files(DELE)
# May be set:
# READ - Read Directory;
# WRITE - Write Directory;
# MKD - Make Directory
<Limit RMD DELE>
DenyAll
</Limit>
</Directory>
</Anonymous>
Перепробовал разные варианты, ничего не помогло. При попытке подключиться к FTP пишет:
USER anonymous
331 Anonymous login ok, send your complete email address as your password
PASS xxxx
530-Unable to set anonymous privileges.
530 Login incorrect.
Права на каталог /home:
rwxr-xr-x 8 root root 176 Май 18 13:56 home
Права на директорию /home/ftp:
drwxr-xr-x 3 root ftp 72 Май 18 13:56 ftp
В логах пишет:
mod_clamav/0.4: warning: No local socket was specified.
FTP session opened.
ftp: Directory ~ftp/ is not accessible.
FTP session closed.
Я не сильно силён в настройках apache, но возникает вопрос не может он - апачь каким-то образом мешать работе proftpd?
В make.conf есть такие флаги:
USE="apache2 clamav libclamav ...."
В passwd такая строчка:
apache:x:81:81:added by portage for apache:/var/www:/sbin/nologin
ftp:x:21:21:added by portage for ftpbase:/home/ftp:/sbin/nologin
proftpd:x:103:1002:added by portage for proftpd:/dev/null:/sbin/nologin
В groups такие строчки:
apache:x:81:
ftp:x:21:
proftpd:x:1002:
Может кто-то победил такую проблемку, отпишитесь буду благодарен.[/b] |
|
Back to top |
|
 |
asser-mag n00b

Joined: 21 Dec 2005 Posts: 6
|
Posted: Mon May 21, 2007 6:50 am Post subject: |
|
|
Во флагах proftpd случаем acl не указан (emerge -pv proftpd)? А то в последних профилях его сделали флагом по-умолчанию. Вот и вылазит где попало... |
|
Back to top |
|
 |
burbulator n00b

Joined: 18 May 2007 Posts: 22 Location: Tomsk
|
Posted: Mon May 21, 2007 7:04 am Post subject: |
|
|
asser-mag wrote: | Во флагах proftpd случаем acl не указан (emerge -pv proftpd)? А то в последних профилях его сделали флагом по-умолчанию. Вот и вылазит где попало... |
Есть такое дело:
[ebuild R ] net-ftp/proftpd-1.3.1_rc2-r1 USE="acl clamav ldap mysql ncurses nls pam ssl tcpd -authfile -hardened -ifsession -ipv6 -noauthunix -opensslcrypt -postgres -radius -rewrite (-selinux) -shaper -sitemisc -softquota -vroot -xinetd" 0 kB
Что от этого меняется?
В make.conf прописывать USE="...-acl..."?
Или можно как-то иначе? |
|
Back to top |
|
 |
asser-mag n00b

Joined: 21 Dec 2005 Posts: 6
|
Posted: Mon May 21, 2007 8:36 am Post subject: |
|
|
Или прописать в /etc/portage/package.use
net-ftp/proftpd -acl
Пересобрать и рестартовать proftpd |
|
Back to top |
|
 |
burbulator n00b

Joined: 18 May 2007 Posts: 22 Location: Tomsk
|
Posted: Mon May 21, 2007 9:05 am Post subject: |
|
|
asser-mag wrote: | Или прописать в /etc/portage/package.use
net-ftp/proftpd -acl
Пересобрать и рестартовать proftpd |
Хорошо я попробую, а вообще если не трудно разъясните чем этот флаг "череват". Что он такое привносит, что перестаёт работать FTP. Может на будущее это можно гденибудь в конфиге подправить?
P.S. спасибо. |
|
Back to top |
|
 |
burbulator n00b

Joined: 18 May 2007 Posts: 22 Location: Tomsk
|
Posted: Mon May 21, 2007 9:20 am Post subject: |
|
|
Всё сделал как написал т.е. дописал в /etc/portage/package.use:
net-ftp/proftpd -acl
И пересобрал proftpd. Всё ЗАРАБОТАЛО, как и было За что Вам ОГРОМНОЕ СПАСИБО!
Но ещё раз повторюсь если не сложно расскажите в чём собака зарыта
Я конечно поищу и почитаю что-за "зверь" этот acl, но буду рад любому пояснению тут.
ОГРОМНОЕ СПАСИБО!!!  |
|
Back to top |
|
 |
asser-mag n00b

Joined: 21 Dec 2005 Posts: 6
|
Posted: Mon May 21, 2007 9:50 am Post subject: |
|
|
cat /usr/portage/profiles/use.desc | grep acl
acl - Adds support for Access Control Lists |
|
Back to top |
|
 |
|