LinuxForum.Fans
Тема

помогите разобратся с настройками

Автор: RASAMAXA 5 сообщений 2065 просмотров
#266947

Делал настройку Ftpd по этой статье http://www.artcom-ufa.ru/posts/2011/05/19/ustanovka-i-nastroika-proftpd

Что то не могу разобратся почему не пускает пользователя.

прописал

ftpasswd --passwd=asd --file=/etc/proftpd/ftpd.passwd --name=vasya --shell=/bin/false --home=/www/zvezda/ --uid=106 --gid=65534

Ftp работает но не пускает, на проверке пароля останавливает, в чем проблема что упустил?

#266961

Конфиг покажи и как настроить ftp надо?

#266964

Конфиг покажу чуть поже, щас не дома.

Настроить фтп хочу так:
1. Каждый имел свою папку где может, создавать папки, записывать и удалять.
2. Не мог выходить выше назначеной папки
3. Самое главное что бы было легко додавать и удальть или менять пароль.

Что то например работы сервера FileZilla на Win. Там в любое время можно поменять пароль переназначить папку, изменить права.

#266968

Так епт, пользователи стандартно, те которые у тебя есть в системе, при логине через ftp какждый попадает в свой хомяк.
Вот с анонимами конфиг, те если не указать user@ip, а просто ip то попадешь в ro анонимный каталог, все остальные заперты в хомяках.

text
ServerName              myserver.com"   # Здесь указываеться имя Вашего сервера
ServerType              standalone      
ServerAdmin             mymail@example.com
DefaultServer           on              # сервер по умолчанию
RequireValidShell       off             # требовать наличия shell в /etc/shells для логина?
# авторизовывать клиента только если он имеет основной shell из списка /etc/shells; 
# область действия - основной сервер, Global, VirtualHost, Anonymous (ВАЖНО!!!)
AuthPAM                 off             # использовать PAM для авторизации?
AuthPAMConfig           ftp             # имя PAM модуля для авторизации
Port                    21              # номер порта для сервера
Umask                   022             # это число отнимается от 777 для получения маски новосозданных файлов
MaxInstances            30              # максимальное количество процессов (соединений)
MaxClientsPerHost       10              # максимальное количество клиентов подключенных к хосту
TimeoutStalled          300             #
TimeoutNoTransfer       600             #
User                    ftp             # имя пользователя от которого будет запущен сервер
Group                   ftp             # имя группы от которой будет запущен сервер
UseReverseDNS           off
IdentLookups            off
TransferLog             /var/log/proftpd.xfer.log
SystemLog               /var/log/proftpd.syst.log
AllowOverwrite          on
RootLogin               off  # запрещаем вход пользователя root
ShowSymlinks            off
DeleteAbortedStores     on   # Автоматическое удаление недогруженного файла
UseFtpUsers             on   # Бан лист из /etc/ftpusers
AccessGrantMsg          "Welcome to ......."
MaxLoginAttempts        3

<Global> DefaultRoot ~ # Non-anonymous users automatically get jailed in their homedir # AllowChmod false DefaultTransferMode binary # If anybody actually _needs_ ASCII, they'll know how to set it DisplayLogin welcome.msg MaxClients 10 DenyFilter \*.*/ # предотвратить попытку положить или взломать демон proftpd # командой "ls */../*/../*/..." </Global>

<Anonymous /var/ftp> # базовая конфигурация анонимного пользователя User ftp # Имя пользователя Group ftp # Имя группы UserAlias anonymous ftp # можем входить как anonymous так и ftp MaxClients 5 # максимальное количество анонимных клиентов #DisplayLogin welcome.msg # при логине вывести содержимое welcome.msg # оно находится в домашней папке пользователя DisplayChdir welcome.msg <Limit WRITE> # запрет записи DenyAll </Limit> </Anonymous>

#266972

вот конфиг

text
#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
# 

# Includes DSO modules Include /etc/proftpd/modules.conf Include /etc/proftpd/tls.conf # Set off to disable IPv6 support which is annoying on IPv4 only boxes. UseIPv6 off # If set on you can experience a longer connection delay in many cases. IdentLookups off

ServerName "ArtSirius_FTP" ServerType standalone DeferWelcome off

MultilineRFC2228 on DefaultServer on ShowSymlinks on

TimeoutNoTransfer 600 TimeoutStalled 600 TimeoutIdle 1200

DisplayLogin welcome.msg DisplayChdir .message true ListOptions "-l"

DenyFilter \*.*/

# Use this to jail all users in their homes DefaultRoot /home/www/ DefaultRoot ~

# Users require a valid shell listed in /etc/shells to login. # Use this directive to release that constrain. RequireValidShell off

# Port 21 is the standard FTP port. Port 21

# In some cases you have to specify passive ports range to by-pass # firewall limitations. Ephemeral ports can be used for that, but # feel free to use a more narrow range. # PassivePorts 49152 65534

# If your host was NATted, this option is useful in order to # allow passive tranfers to work. You have to use your public # address and opening the passive ports used on your firewall as well. #MasqueradeAddress 192.168.1.126

# This is useful for masquerading address with dynamic IPs: # refresh any configured MasqueradeAddress directives every 8 hours <IfModule mod_dynmasq.c> # DynMasqRefresh 28800 </IfModule>

# 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

# Set the user and group that the server normally runs at. User ftp Group nogroup

# Umask 022 is a good standard umask to prevent new files and dirs # (second parm) from being group and world writable. Umask 022 022 # Normally, we want files to be overwriteable. AllowOverwrite on

# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords: # PersistentPasswd off

# This is required to use both PAM-based authentication and local passwords # AuthOrder mod_auth_pam.c* mod_auth_unix.c

# Be warned: use of this directive impacts CPU average load! # Uncomment this if you like to see progress and transfer rate with ftpwho # in downloads. That is not needed for uploads rates. # # UseSendFile off

TransferLog /var/log/proftpd/xferlog SystemLog /var/log/proftpd/proftpd.log UseReverseDNS off

<IfModule mod_quotatab.c> QuotaEngine off </IfModule>

<IfModule mod_ratio.c> Ratios off </IfModule>

# Delay engine reduces impact of the so-called Timing Attack described in # http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02 # It is on by default. <IfModule mod_delay.c> DelayEngine on </IfModule>

<IfModule mod_ctrls.c> ControlsEngine off ControlsMaxClients 2 ControlsLog /var/log/proftpd/controls.log ControlsInterval 5 ControlsSocket /var/run/proftpd/proftpd.sock </IfModule>

<IfModule mod_ctrls_admin.c> AdminControlsEngine off </IfModule>

# # Alternative authentication frameworks # #Include /etc/proftpd/ldap.conf #Include /etc/proftpd/sql.conf

# # This is used for FTPS connections # #Include /etc/proftpd/tls.conf

# # Useful to keep VirtualHost/VirtualRoot directives separated # #Include /etc/proftpd/virtuals.con

# A basic anonymous configuration, no upload directories.

# <Anonymous ~ftp> # User ftp # Group nogroup # # We want clients to be able to login with "anonymous" as well as "ftp" # UserAlias anonymous ftp # # Cosmetic changes, all files belongs to ftp user # DirFakeUser on ftp # DirFakeGroup on ftp # # RequireValidShell off # # # Limit the maximum number of anonymous logins # MaxClients 10 # # # We want 'welcome.msg' displayed at login, and '.message' displayed # # in each newly chdired directory. # DisplayLogin welcome.msg # DisplayChdir .message # # # Limit WRITE everywhere in the anonymous chroot # <Directory *> # <Limit WRITE> # DenyAll # </Limit> # </Directory> # # # Uncomment this if you're brave. # # <Directory incoming> # # # Umask 022 is a good standard umask to prevent new files and dirs # # # (second parm) from being group and world writable. # # Umask 022 022 # # <Limit READ WRITE> # # DenyAll # # </Limit> # # <Limit STOR> # # AllowAll # # </Limit> # # </Directory> # # </Anonymous> <Global> RootLogin off </Global> AuthUserFile /etc/proftpd/ftpd.passwd

Войдите или зарегистрируйтесь, чтобы ответить.