LinuxForum.Fans
Тема

вопрос по proftpd

Автор: tyrnov 26 сообщений 8407 просмотров
#141826

конфиг: http://paste.pocoo.org/show/355969/

Не пойму какая папка сейчас расшарена. И где я могу указать нужную мне в данном конфиге

#141829

мой конфиг
http://pastebin.com/AMmVM4Me

папка /home/FTP
кто имеет доступ userftp
правда права все limit ALL
<Directory /home/FTP>
<limit ALL>
Order allow,deny
AllowUser userftp
DenyAll
</limit>
</directory>

#141836

При вашем конфиге:

text
/etc/init.d/proftpd restart
 * The ProFTPD configuration file /etc/proftpd/proftpd.conf is invalid! You have to
 * fix your configuration in order to run the ProFTPD server. For more information
 * you may execute the ProFTPD configuration check '/usr/sbin/proftpd -t'.
 * ERROR: proftpd failed to stop
calculate chipset # /etc/init.d/proftpd restart
 * The ProFTPD configuration file /etc/proftpd/proftpd.conf is invalid! You have to
 * fix your configuration in order to run the ProFTPD server. For more information
 * you may execute the ProFTPD configuration check '/usr/sbin/proftpd -t'.
 * ERROR: proftpd failed to stop
#141853

В вашем конфиге
User nobody
Group nogroup
у меня

# под кем работаем
User proftpd
Group nogroup

Исправьте под своё

#141855

http://paste.pocoo.org/show/356005/ Сделал так поидее должна же быть открыта папка : /home/chipset или я чето еще не добавил

#141856

Закрыть не забудь.
/home/chipset/

#141858

Закрыл. Захожу по фтп показывает что там пусто, но это не так

#141861

покаж
ls -l /home/chipset/

#141862
text
# ls -l /home/chipset/
итого 64
-rw-r--r-- 1 root    root      135 Мар 19 10:39 1
-rw-r--r-- 1 root    root       25 Мар 18 20:48 htpasswd
-rw-r--r-- 1 chipset chipset     0 Мар 19 14:09 rtorrent.log
-rw-r--r-- 1 chipset chipset 19867 Мар 19 10:17 rtorrent-man.txt
drwxr-xr-x 4 chipset chipset  4096 Мар 19 14:16 torrent
drwxr-xr-x 2 chipset chipset  4096 Мар 17 23:55 Видео
drwxr-xr-x 2 chipset chipset  4096 Мар 17 23:55 Документы
drwxr-xr-x 3 chipset chipset  4096 Мар 19 09:52 Загрузки
drwxr-xr-x 2 chipset chipset  4096 Мар 17 23:55 Картинки
drwxr-xr-x 2 chipset chipset  4096 Мар 17 23:55 Музыка
drwxr-xr-x 2 chipset chipset  4096 Мар 17 23:55 Общедоступные
drwxr-xr-x 2 chipset chipset  4096 Мар 19 10:19 Рабочий стол
drwxr-xr-x 2 chipset chipset  4096 Мар 17 23:55 Шаблоны
#141865

как вариант в конец добавь

<Directory /home/chipset/>
<limit ALL>
Order allow,deny
AllowUser chipset
DenyAll
</limit>
</directory>

И пробни зайти под chipset

#141872

Добавил. А как я зайду под chipset когда я не ввожу не логина не пароля при входе

#141875

Убери
<Anonymous ~ftp>
User ftp
Group ftp
AnonRequirePassword off
MaxClients 10
UserAlias anonymous ftp
DisplayLogin welcome.msg
<Limit WRITE>
Deny from all
</Limit>
<Directory /home/chipset>
<Limit STOR MKD RMD XMKD XRMD WRITE PWD XPWD>
AllowAll
</Limit>
</Directory>
</Anonymous>

#141878

Все сделал. Спасибо

#141913

А как еще добавить чтобы по фтп мог менять права на файл к примеру захотел поставил 777 по фтп, а мне выдает:

text
Команда:    SITE CHMOD 777 днс.txt
Ответ:    550 CHMOD 777 днс.txt: Отказано в доступе
#141916

Вот сюда добавь
<Limit SITE_CHMOD>
DenyAll
</Limit>
или зделай вот так
<Limit SITE_CHMOD>
DenyAll
AllowUser chipset
</Limit>

#141921

Ага помогло.

#141957

Дважды решено (-:

#148860

Подскажите куда копать???
Мозиллой требует логин/пароль, если ввести свой текущий, то открывает сразу каталог /media/250GB/ftp/pub и русские символы испорчены. А анонимно вообще не входит.

Да, и доступен ftp только с того же компа, по ip 192.168.1.2. А по имени name.dyndns.org (и его ip) и по 10.95.23.xxx вообще не доступен.

Показать

# Имя FTP сервера, отображается в строке приветствия.
ServerName "my FTP Server"
# Кроме standalone есть возможность запуска сервера через inetd, но standalone удобней.
ServerType standalone
DefaultServer on
ScoreboardFile /var/run/proftpd/proftpd.scoreboard

# Port 21 is the standard FTP port.
Port 21

# Нужно указать доменное имя и ip адрес под которым сервер будет виден снаружи
MasqueradeAddress name.dyndns.org
MasqueradeAddress 10.95.23.xxx
# Нужно указать порты для пассивного соединения которые будут пробрасываться через NAT, желательно что бы портов было >100.
PassivePorts 49152 65534

# Some black magic, for further explanation see ProFTPd options guide http://www.proftpd.org/docs/directives/linked/by-name.html
IdentLookups off
UseReverseDNS off

UseIPv6 off

# 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 nobody
Group nobody

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>

RequireValidShell off

# С помощью этих параметров мы включаем перекодирование имен файлов записанных на локальной файловой системе в кодировке koi8-r в cp1251 для удобного их отображения для windows клиентов.
LangEngine on
UseEncoding KOI8-R CP1251


# Директория - домашняя директория пользователя ftp - в котором будут находиться файлы доступные для скачивания с анонимного FTP сервера
<Anonymous /media/250GB/ftp>
User ftp
Group ftp

<Limit LOGIN>
AllowAll
</Limit>

AnonRequirePassword off

### 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 3 "Sorry, max $m users - try again later"

# Limit transfer rate to 60 KB/s, but first 3 MB on full speed.
# TransferRate RETR 60:3145728

### 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 CWD DIRS READ LIST>
AllowAll
</Limit>
<Limit WRITE>
DenyAll
</Limit>
<Directory /media/250GB/ftp/incoming/*>
<Limit READ CWD RETR CWD>
AllowAll
</Limit>
<Limit WRITE>
AllowAll
</Limit>
<Limit DELE>
DenyAll
</Limit>
</Directory>
</Anonymous>
Войдите или зарегистрируйтесь, чтобы ответить.