Форум русскоязычного сообщества Ubuntu


Считаете, что Ubuntu недостаточно дружелюбна к новичкам?
Помогите создать новое Руководство для новичков!

Автор Тема: Настроить доступ proftpd к /var/www/  (Прочитано 2705 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн andreyjkee

  • Автор темы
  • Новичок
  • *
  • Сообщений: 18
    • Просмотр профиля
    • HLmod.ru
Настроить доступ proftpd к /var/www/
« : 28 Августа 2010, 21:27:06 »
Как в proftpd настроить доступ к каталогу /var/www/ ? :'(
Сервер на хостинге, ubuntu 10.04 LTS
http://ubuntuforums.org/showthread.php?t=51611 это читал

Пользователь решил продолжить мысль 28 Августа 2010, 22:00:41:
Вот конфиг:
# To really apply changes reload proftpd after modifications.
AllowOverwrite on
AuthAliasOnly on

# Choose here the user alias you want !!!!
UserAlias root andreyjkee

ServerName "siteftp"
ServerType standalone
DeferWelcome on

MultilineRFC2228 on
DefaultServer on
ShowSymlinks on

TimeoutNoTransfer 600
TimeoutStalled 100
TimeoutIdle 2200

DisplayChdir                    .message
ListOptions                "-la"

RequireValidShell off

TimeoutLogin 20

RootLogin off

# It's better for debug to create log files ;-)
ExtendedLog /var/log/ftp.log
TransferLog /var/log/xferlog
SystemLog /var/log/syslog.log

#DenyFilter \*.*/

# I don't choose to use /etc/ftpusers file (set inside the users you want to ban, not useful for me)
UseFtpUsers off

# Allow to restart a download
AllowStoreRestart on

# Port 21 is the standard FTP port, so you may prefer to use another port for security reasons (choose here the port you want)
Port 21

# 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 8

# Set the user and group that the server normally runs at.
User                  nobody
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

PersistentPasswd off

MaxClients 2
MaxClientsPerHost 2
MaxClientsPerUser 2
MaxHostsPerUser 2

# Display a message after a successful login
AccessGrantMsg "welcome !!!"
# This message is displayed for each access good or not
ServerIdent                  on       "you're at home"

# Set /home/FTP-shared directory as home directory
DefaultRoot /home/FTP-shared

# Lock all the users in home directory, ***** really important *****
DefaultRoot ~

MaxLoginAttempts    5

#VALID LOGINS
<Limit LOGIN>
AllowUser andreyjkee
DenyALL
</Limit>

<Directory /home/FTP-shared>
Umask 022 022
AllowOverwrite off
<Limit MKD STOR DELE XMKD RNRF RNTO RMD XRMD>
DenyAll
</Limit>
</Directory>

<Directory /home/FTP-shared/download/*>
Umask 022 022
AllowOverwrite off
<Limit MKD STOR DELE XMKD RNEF RNTO RMD XRMD>
DenyAll
</Limit>
</Directory>

<Directory /home/FTP-shared/upload/>
Umask 022 022
AllowOverwrite on
<Limit READ RMD DELE>
      DenyAll
    </Limit>

    <Limit STOR CWD MKD>
      AllowAll
    </Limit>
</Directory>

<Directory /home/FTP-shared/site.ru>
Umask 022 022
AllowOverwrite on
<Limit READ RMD DELE>
      DenyAll
    </Limit>

    <Limit STOR CWD MKD>
      AllowAll
    </Limit>
</Directory>
и создана ссылка ln -s /home/FTP-shared/site.ru /var/www/site.ru
« Последнее редактирование: 28 Августа 2010, 22:00:41 от andreyjkee »

Оффлайн XyLigan

  • Новичок
  • *
  • Сообщений: 10
    • Просмотр профиля
Re: Настроить доступ proftpd к /var/www/
« Ответ #1 : 28 Августа 2010, 22:16:01 »
попробуй в defaultroot указать /var/www/

Оффлайн andreyjkee

  • Автор темы
  • Новичок
  • *
  • Сообщений: 18
    • Просмотр профиля
    • HLmod.ru
Re: Настроить доступ proftpd к /var/www/
« Ответ #2 : 28 Августа 2010, 22:49:02 »
попробуй в defaultroot указать /var/www/
вот такой конфиг пробовал:
# To really apply changes reload proftpd after modifications.
AllowOverwrite on
AuthAliasOnly on

# Choose here the user alias you want !!!!
UserAlias root andreyjkee

ServerName "ftpserv"
ServerType standalone
DeferWelcome on

MultilineRFC2228 on
DefaultServer on
ShowSymlinks on

TimeoutNoTransfer 600
TimeoutStalled 100
TimeoutIdle 2200

ListOptions                "-la"

RequireValidShell off

TimeoutLogin 20

RootLogin off

# It's better for debug to create log files ;-)
ExtendedLog /var/log/ftp.log
TransferLog /var/log/xferlog
SystemLog /var/log/syslog.log

#DenyFilter \*.*/

# I don't choose to use /etc/ftpusers file (set inside the users you want to ban, not useful for me)
UseFtpUsers off

# Allow to restart a download
AllowStoreRestart on

# Port 21 is the standard FTP port, so don't use it for security reasons (choose here the port you want)
Port 21

# 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 8

# Set the user and group that the server normally runs at.
User                  nobody
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

PersistentPasswd off

MaxClients 8
MaxClientsPerHost 8
MaxClientsPerUser 8
MaxHostsPerUser 8

# Display a message after a successful login
AccessGrantMsg "welcome !!!"
# This message is displayed for each access good or not
ServerIdent                  on       "you're at home"

# Set /home/FTP-shared directory as home directory
#DefaultRoot /home/FTP-shared

# Lock all the users in home directory, ***** really important *****
#DefaultRoot ~
DefaultRoot /var/www/site.ru

MaxLoginAttempts    5

#VALID LOGINS
<Limit LOGIN>
AllowUser andreyjkee
DenyALL
</Limit>

<Directory /var/www/site.ru/>
Umask 022 022
AllowOverwrite on
<Limit MKD STOR DELE XMKD RNRF RNTO RMD XRMD>
DenyAll
</Limit>
</Directory>

<Directory /var/www/site.ru/*>
Umask 022 022
AllowOverwrite on
<Limit MKD STOR DELE XMKD RNEF RNTO RMD XRMD>
DenyAll
</Limit>
</Directory>
При логине по ftp попадаю в пустую папку.

Оффлайн X-Hunter

  • Новичок
  • *
  • Сообщений: 1
    • Просмотр профиля
Re: Настроить доступ proftpd к /var/www/
« Ответ #3 : 29 Августа 2010, 01:12:03 »
верни DefaultRoot ~
и после DefaultRoot /var/www/site.ru напиши юзверя под каким надо попадать в эту папку (к примеру DefaultRoot /var/www/site.ru ftp)

Оффлайн andreyjkee

  • Автор темы
  • Новичок
  • *
  • Сообщений: 18
    • Просмотр профиля
    • HLmod.ru
Re: Настроить доступ proftpd к /var/www/
« Ответ #4 : 29 Августа 2010, 13:40:15 »
Не помогло =
Кто нибудь может привести пример своего рабочего конфига?

Пользователь решил продолжить мысль 29 Августа 2010, 20:31:37:
Настроил по этому мануалу
« Последнее редактирование: 29 Августа 2010, 20:31:37 от andreyjkee »

 

Страница сгенерирована за 0.029 секунд. Запросов: 20.