Код: Выделить всё
/usr/storage/Incomming - владелец ftp:ftp
В /usr/local/etc/proftpd.conf:
Код: Выделить всё
#
# For more informations about Proftpd configuration
# look at : http://www.proftpd.org/
#
# 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 anon.
ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on
#ScoreboardFile /var/run/proftpd.scoreboard
# Port 21 is the standard FTP port.
Port 21
# 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 maximum number of processes per service
# (such as xinetd).
MaxInstances 30
CommandBufferSize 512
# Set the user and group under which the server will run.
User ftp
Group ftp
SQLAuthTypes Plaintext
SQLAuthenticate users
SQLConnectInfo ftp@localhost:3306 ftp ftp
SQLUserInfo `users_table` `username` `password` `uid` `gid` \
`homedir` `shell`
RequireValidShell off
SQLLogFile /var/log/proftpd.log
SQLLog PASS counter_login
SQLNamedQuery counter_login UPDATE "`last_login`=UNIX_TIMESTAMP(), \
`login_count`=`login_count`+1 WHERE \
`username`='%u'" `users_table`
SQLLog ERR_PASS counter_err
SQLNamedQuery counter_err UPDATE "`last_err_login`=UNIX_TIMESTAMP(), \
`err_login_count`=`err_login_count`+1 WHERE \
`username`='%U'" `users_table`
SQLLog RETR,STOR log_story_transfer
SQLNamedQuery log_story_transfer INSERT "'',\
UNIX_TIMESTAMP(),'%u',\
'%f', '%b', '%h', \
'%a', '%m', '%T'" \
`xfer_table`
SQLLOG ERR_RETR,ERR_STOR,ERR_DELE,ERR_RMD,ERR_RNTO\
log_err_modify
SQLNamedQuery log_err_modify INSERT "'',\
UNIX_TIMESTAMP(),\
'%u', '%f', '%h', \
'%a', '%m'" `xfer_errors`
UseReverseDNS off
IdentLookups off
#ause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~ !vovs
# Normally, we want files to be overwriteable.
#AllowOverwrite on
#<Directory ~>
#AllowOverwrite on
#<Limit Write>
#AllowAll
#</Limit>
#<Limit READ>
#AllowAll
#</Limit>
#</Directory>
#<Directory /usr/storage/Incomming>
<Directory ~/Incomming>
AllowOverwrite on
<Limit Write>
AllowAll
</Limit>
<Limit READ>
AllowAll
</Limit>
</Directory>
#<Directory /usr/storage/pub>
<Directory ~/pub>
AllowOverwrite off
<Limit Write>
AllowAll
</Limit>
<Limit READ>
AllowAll
</Limit>
</Directory>
<Anonymous /usr/home/ftp>
# РПМШЪПЧБФЕМШ ПФ ЛПФПТПЗП БОПОЙНПХУЩ ЫБТСФУС
User ftp
# ЗТХРРБ БОПОЙНПХУПЧ
Group ftp
# БМШСУЩ БОБОПОЙНПХУПЧ (НПЦОП ВХДЕФ ЧИПДЙФШ ЛБЛ ftp, Б
# ОЕ anonymous)
UserAlias anonymous ftp
# НБЛУЙНБМШОП ЮЙУМП БОПОЙНПХУПЧ
MaxClients 10 "Sorry, max %m users - try again later"
<Limit WRITE>
DenyAll
</Limit>
</Anonymous>
# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>
В базе MYSQL есть такие пользователи:
Код: Выделить всё
1 vovs [реальный_пароль] wheel 1001 1001 /usr/storage /bin/sh 1228942756 17 0 0
2 admin admin ftp 1000 1000 /usr/storage /sbin/nologin 1228942682 6 0 0
admin - в системе нет. Просто добавил для юзания фтпшника.
1. Когда логинюсь возникает задержка 10-20секунд.
Раскомментирование строк
Код: Выделить всё
UseReverseDNS off
IdentLookups off
2. Когда логинюсь под пользователем vovs - не могу выйти за пределы /usr/storage -- пишет
Код: Выделить всё
PWD
257 "/" is the current directory
Код: Выделить всё
DefaultRoot ~ !vovs
Код: Выделить всё
Permission denied
Владельцем записанного файла оказывается <Unknown user>:ftp
Получается, что группа то ftp, так почему я не могу записать? Группе же разрешена запись..
Подскажите пожалуйста как можно решить эти вопросы...