Решено: анонимный ftp

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

karpos
Сообщения: 50
ОС: archlinux

Решено: анонимный ftp

Сообщение karpos »

Решил настроить анонимный ftp centos 6.4 но вот я здесь а значит что то не заработало. Нашел хорошую статью вот мой конфиг
vsftpd.conf

Код: Выделить всё

ftpd_banner="Welcom to VSFTP Server"

listen=yes
listen_port=21

anonymous_enable=yes
no_anon_password=yes

pasv_enable=yes
write_enable=yes

anon_root=/var/ftp
anon_umask=022

anon_upload_enable=yes
anon_mkdir_write_enable=yes
anon_other_write_enable=yes
anon_world_readable_only=no

xferlog_enable=yes
vsftpd_log_file=/var/log/vsftpd.log

#pam_service_name=vsftpd
#userlist_enable=no
#tcp_wrappers=yes

#max_clients=100
#max_per_ip=10
#hide_ids=yes

log_ftp_protocol=yes
lock_upload_files=no

на директорию /var/ftp права
[root@ftp var]# chmod -R 755 /var/ftp
[root@ftp var]# chown -R root:root /var/ftp
меня туда пускает я захожу норм но записывать ничего не могу
если я делаю так [root@ftp var]# chown -R ftp:ftp /var/ftp
то он спрашивает логин пароль но тут такая штука случайно поучилось я подключился к серверу с провами root:root
и не отключаясь поменял права на ftp:ftp запись пошла, но передоключился сразу говорит логин пароль.
если ставлю nobody:nobody то пускает но записывать не дает.
У вас нет необходимых прав для просмотра вложений в этом сообщении.
Спасибо сказали:
Аватара пользователя
SLEDopit
Модератор
Сообщения: 4824
Статус: фанат консоли (=
ОС: GNU/Debian, RHEL

Re: Решено: анонимный ftp

Сообщение SLEDopit »

karpos писал(а):
23.10.2013 12:32
[root@ftp var]# chmod -R 755 /var/ftp
[root@ftp var]# chown -R root:root /var/ftp
меня туда пускает я захожу норм но записывать ничего не могу
Разумеется. Права только root'у на запись выдали. А vsftpd заходит как ftp.

karpos писал(а):
23.10.2013 12:32
если я делаю так [root@ftp var]# chown -R ftp:ftp /var/ftp
то он спрашивает логин пароль но тут такая штука случайно поучилось я подключился к серверу с провами root:root
и не отключаясь поменял права на ftp:ftp запись пошла, но передоключился сразу говорит логин пароль.
если ставлю nobody:nobody то пускает но записывать не дает.
какая сложная ситуация. в логах то что написано? ( /var/log/vsftpd.log )
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don't do mistakes, the more bugs are in your code.
Спасибо сказали:
karpos
Сообщения: 50
ОС: archlinux

Re: Решено: анонимный ftp

Сообщение karpos »

Код: Выделить всё

[root@ftp log]# cat /var/log/vsftpd.log
Wed Oct 23 23:41:59 2013 [pid 1445] CONNECT: Client "192.168.0.181"
Wed Oct 23 23:41:59 2013 [pid 1445] FTP response: Client "192.168.0.181", "220 "Welcom to VSFTP Server""
Wed Oct 23 23:41:59 2013 [pid 1445] FTP command: Client "192.168.0.181", "USER anonymous"
Wed Oct 23 23:41:59 2013 [pid 1444] [ftp] OK LOGIN: Client "192.168.0.181", anon password "<no_password>"
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP response: Client "192.168.0.181", "230 Login successful."
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP command: Client "192.168.0.181", "SYST"
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP response: Client "192.168.0.181", "215 UNIX Type: L8"
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP command: Client "192.168.0.181", "PWD"
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP response: Client "192.168.0.181", "257 "/""
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP command: Client "192.168.0.181", "TYPE I"
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP response: Client "192.168.0.181", "200 Switching to Binary mode."
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP command: Client "192.168.0.181", "EPSV"
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP response: Client "192.168.0.181", "229 Entering Extended Passive Mode (|||55388|)."
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP command: Client "192.168.0.181", "SIZE /"
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP response: Client "192.168.0.181", "550 Could not get file size."
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP command: Client "192.168.0.181", "CWD /"
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP response: Client "192.168.0.181", "250 Directory successfully changed."
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP command: Client "192.168.0.181", "LIST"
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP response: Client "192.168.0.181", "150 Here comes the directory listing."
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP response: Client "192.168.0.181", "226 Directory send OK."
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP command: Client "192.168.0.181", "QUIT"
Wed Oct 23 23:41:59 2013 [pid 1446] [ftp] FTP response: Client "192.168.0.181", "221 Goodbye."
Wed Oct 23 23:42:30 2013 [pid 1466] CONNECT: Client "192.168.0.181"
Wed Oct 23 23:42:30 2013 [pid 1466] FTP response: Client "192.168.0.181", "220 "Welcom to VSFTP Server""
Wed Oct 23 23:42:30 2013 [pid 1466] FTP command: Client "192.168.0.181", "USER anonymous"
Wed Oct 23 23:42:30 2013 [pid 1465] [ftp] OK LOGIN: Client "192.168.0.181", anon password "<no_password>"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "230 Login successful."
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "SYST"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "215 UNIX Type: L8"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "FEAT"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "211-Features:"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " EPRT??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " EPSV??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " MDTM??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " PASV??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " REST STREAM??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " SIZE??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " TVFS??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " UTF8??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "211 End"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "HELP SITE"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "214-The following commands are recognized."
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " ABOR ACCT ALLO APPE CDUP CWD  DELE EPRT EPSV FEAT HELP LIST MDTM MKD??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " MODE NLST NOOP OPTS PASS PASV PORT PWD  QUIT REIN REST RETR RMD  RNFR??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", " XPWD XRMD??"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "214 Help OK."
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "OPTS UTF8 ON"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "200 Always in UTF8 mode."
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "PWD"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "257 "/""
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "TYPE A"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "200 Switching to ASCII mode."
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,212,189"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "LIST"
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "150 Here comes the directory listing."
Wed Oct 23 23:42:30 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "226 Directory send OK."
Wed Oct 23 23:42:33 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "TYPE I"
Wed Oct 23 23:42:33 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "200 Switching to Binary mode."
Wed Oct 23 23:42:33 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,212,190"
Wed Oct 23 23:42:33 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Wed Oct 23 23:42:33 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "STOR htop.jpg"
Wed Oct 23 23:42:33 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "553 Could not create file."
Wed Oct 23 23:42:33 2013 [pid 1467] [ftp] FAIL UPLOAD: Client "192.168.0.181", "/htop.jpg", 0.00Kbyte/sec
Wed Oct 23 23:42:36 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,212,191"
Wed Oct 23 23:42:36 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Wed Oct 23 23:42:36 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "STOR htop.jpg"
Wed Oct 23 23:42:36 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "553 Could not create file."
Wed Oct 23 23:42:36 2013 [pid 1467] [ftp] FAIL UPLOAD: Client "192.168.0.181", "/htop.jpg", 0.00Kbyte/sec
Wed Oct 23 23:42:38 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "TYPE A"
Wed Oct 23 23:42:38 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "200 Switching to ASCII mode."
Wed Oct 23 23:42:38 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,212,192"
Wed Oct 23 23:42:38 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Wed Oct 23 23:42:38 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "LIST"
Wed Oct 23 23:42:38 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "150 Here comes the directory listing."
Wed Oct 23 23:42:38 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "226 Directory send OK."
Wed Oct 23 23:42:41 2013 [pid 1467] [ftp] FTP command: Client "192.168.0.181", "QUIT"
Wed Oct 23 23:42:41 2013 [pid 1467] [ftp] FTP response: Client "192.168.0.181", "221 Goodbye."

с правами root root 755. сначала я зашел через веб все хорошо открылся, потом подключился клиентом и попытался записать файл htop.jpg


он говорит "553 Could not create file." вот selinux у меня отключен.

cat /selinux/enforce
cat: /selinux/enforce: Нет такого файла или каталога
[root@ftp ~]# cat /selinux/disable
cat: /selinux/disable: Нет такого файла или каталога
[root@ftp ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Спасибо сказали:
karpos
Сообщения: 50
ОС: archlinux

Re: Решено: анонимный ftp

Сообщение karpos »

вот другой лог. я подключился с правами root root. потом делаю так chown -R ftp:ftp /var/ftp
[root@ftp log]# cat /var/log/vsftpd.log

Код: Выделить всё

Thu Oct 24 00:12:45 2013 [pid 1580] CONNECT: Client "192.168.0.181"
Thu Oct 24 00:12:45 2013 [pid 1580] FTP response: Client "192.168.0.181", "220 "Welcom to VSFTP Server""
Thu Oct 24 00:12:45 2013 [pid 1580] FTP command: Client "192.168.0.181", "USER anonymous"
Thu Oct 24 00:12:45 2013 [pid 1579] [ftp] OK LOGIN: Client "192.168.0.181", anon password "<no_password>"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "230 Login successful."
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "SYST"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "215 UNIX Type: L8"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "FEAT"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "211-Features:"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " EPRT??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " EPSV??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " MDTM??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " PASV??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " REST STREAM??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " SIZE??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " TVFS??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " UTF8??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "211 End"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "HELP SITE"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "214-The following commands are recognized."
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " ABOR ACCT ALLO APPE CDUP CWD  DELE EPRT EPSV FEAT HELP LIST MDTM MKD??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " MODE NLST NOOP OPTS PASS PASV PORT PWD  QUIT REIN REST RETR RMD  RNFR??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", " XPWD XRMD??"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "214 Help OK."
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "OPTS UTF8 ON"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 Always in UTF8 mode."
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "PWD"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "257 "/""
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "TYPE A"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 Switching to ASCII mode."
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,220,160"
Thu Oct 24 00:12:45 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Thu Oct 24 00:12:46 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "LIST"
Thu Oct 24 00:12:46 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "150 Here comes the directory listing."
Thu Oct 24 00:12:46 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "226 Directory send OK."
Thu Oct 24 00:12:54 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "CWD pub"
Thu Oct 24 00:12:54 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "250 Directory successfully changed."
Thu Oct 24 00:12:54 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "PWD"
Thu Oct 24 00:12:54 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "257 "/pub""
Thu Oct 24 00:12:54 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,220,161"
Thu Oct 24 00:12:54 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Thu Oct 24 00:12:54 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "LIST"
Thu Oct 24 00:12:54 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "150 Here comes the directory listing."
Thu Oct 24 00:12:54 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "226 Directory send OK."
Thu Oct 24 00:12:57 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "TYPE I"
Thu Oct 24 00:12:57 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 Switching to Binary mode."
Thu Oct 24 00:12:57 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,220,162"
Thu Oct 24 00:12:57 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Thu Oct 24 00:12:57 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "STOR htop.jpg"
Thu Oct 24 00:12:57 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "553 Could not create file."
Thu Oct 24 00:12:57 2013 [pid 1581] [ftp] FAIL UPLOAD: Client "192.168.0.181", "/pub/htop.jpg", 0.00Kbyte/sec
Thu Oct 24 00:13:00 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,220,163"
Thu Oct 24 00:13:00 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Thu Oct 24 00:13:00 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "STOR htop.jpg"
Thu Oct 24 00:13:00 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "553 Could not create file."
Thu Oct 24 00:13:00 2013 [pid 1581] [ftp] FAIL UPLOAD: Client "192.168.0.181", "/pub/htop.jpg", 0.00Kbyte/sec
Thu Oct 24 00:13:03 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,220,164"
Thu Oct 24 00:13:03 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Thu Oct 24 00:13:03 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "STOR htop.jpg"
Thu Oct 24 00:13:03 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "553 Could not create file."
Thu Oct 24 00:13:03 2013 [pid 1581] [ftp] FAIL UPLOAD: Client "192.168.0.181", "/pub/htop.jpg", 0.00Kbyte/sec
Thu Oct 24 00:13:06 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "TYPE A"
Thu Oct 24 00:13:06 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 Switching to ASCII mode."
Thu Oct 24 00:13:06 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,220,165"
Thu Oct 24 00:13:06 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Thu Oct 24 00:13:06 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "LIST"
Thu Oct 24 00:13:06 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "150 Here comes the directory listing."
Thu Oct 24 00:13:06 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "226 Directory send OK."
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "TYPE I"
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 Switching to Binary mode."
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,220,166"
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "STOR htop.jpg"
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "150 Ok to send data."
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] OK UPLOAD: Client "192.168.0.181", "/pub/htop.jpg", 199162 bytes, 1291.62Kbyte/sec
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "226 Transfer complete."
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "SIZE htop.jpg"
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "213 199162"
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "TYPE A"
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 Switching to ASCII mode."
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "PORT 192,168,0,181,220,167"
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "200 PORT command successful. Consider using PASV."
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "LIST"
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "150 Here comes the directory listing."
Thu Oct 24 00:13:15 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "226 Directory send OK."
Thu Oct 24 00:13:18 2013 [pid 1581] [ftp] FTP command: Client "192.168.0.181", "QUIT"
Thu Oct 24 00:13:18 2013 [pid 1581] [ftp] FTP response: Client "192.168.0.181", "221 Goodbye."
Спасибо сказали:
Аватара пользователя
mr_A3ap41k
Сообщения: 8
ОС: Red Hat, CentOS

Re: Решено: анонимный ftp

Сообщение mr_A3ap41k »

Пробуй ставить права на папку 777.
Спасибо сказали:
karpos
Сообщения: 50
ОС: archlinux

Re: Решено: анонимный ftp

Сообщение karpos »

anon_umask тогда что поставить ?
Спасибо сказали:
karpos
Сообщения: 50
ОС: archlinux

Re: Решено: анонимный ftp

Сообщение karpos »

нет 777 на /var/ftp не получается пользователь ftp:ftp, anon_umask пробовал 022 и 000 ошибка 500 oops: vsftpd: refusing to run with writable anonymous root. просит логин пароль.
Спасибо сказали:
Аватара пользователя
mr_A3ap41k
Сообщения: 8
ОС: Red Hat, CentOS

Re: Решено: анонимный ftp

Сообщение mr_A3ap41k »

Я бы по умолчанию (0777) оставил, т.е закомментировать этот параметр.
Спасибо сказали:
Ism
Сообщения: 1261
Статус: Никто, по сути быдло

Re: Решено: анонимный ftp

Сообщение Ism »

Не по теме
vsftpd жесть для настройки, неверное движение и не настроишь за 5 суток, эта штука заточена на секурность а не на удобное использование
Есть proftpd и pure-ftpd попроще
proftpd хороший структурированный конфиг
pure-ftpd очень прост

Насчет логов выше, насколько я знаю на корневую папку должны стоять определенные права, кажется 755, а писать можно только в подпапки, если чтото не правилам vsftpd просто блокируется, но причину выяснить непросто
Спасибо сказали:
Аватара пользователя
SLEDopit
Модератор
Сообщения: 4824
Статус: фанат консоли (=
ОС: GNU/Debian, RHEL

Re: Решено: анонимный ftp

Сообщение SLEDopit »

Ism писал(а):
23.10.2013 19:02
vsftpd жесть для настройки
ничего сложного там нет. если доки почитать. А без доков с любым ftp сервером будет "жесть для настройки".
karpos писал(а):
23.10.2013 17:34
нет 777 на /var/ftp не получается пользователь ftp:ftp, anon_umask пробовал 022 и 000 ошибка 500 oops: vsftpd: refusing to run with writable anonymous root. просит логин пароль.
ну всё же в ошибке написано. не нравится ему, что корень chroot доступен для записи. в последних версиях появилась директива в конфиге
allow_writeable_chroot=YES . Её и стоит применить.

Ну и 777 всё же не стоит туда ставить. Не секурно это. 755 должно быть достаточно.

И пляски с владельцем каталога стоит прекратить. Должен быть ftp и больше не надо его менять.
Вот конфиг, у меня с ним всё отлично заработало. vsftpd 3.0.2-3 .

Код: Выделить всё

listen=YES
anonymous_enable=YES
write_enable=YES
local_umask=002
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
ftpd_banner=Welcome to blah FTP service.
ls_recurse_enable=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
allow_writeable_chroot=YES

UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don't do mistakes, the more bugs are in your code.
Спасибо сказали:
karpos
Сообщения: 50
ОС: archlinux

Re: Решено: анонимный ftp

Сообщение karpos »

полностью скопировал твой конфиг он ругается на эту строчку allow_writeable_chroot=YES
Спасибо сказали:
karpos
Сообщения: 50
ОС: archlinux

Re: Решено: анонимный ftp

Сообщение karpos »

allow_writeable_chroot=YES
Спасибо сказали:
karpos
Сообщения: 50
ОС: archlinux

Re: Решено: анонимный ftp

Сообщение karpos »

ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
а директорию не надо указывать он cам знает /var/ftp, просто я засомневался ну и логи он перестал писать.
пишут что надо корневой папке чтение запись запретить только как я не пойму.
Спасибо сказали:
Аватара пользователя
SLEDopit
Модератор
Сообщения: 4824
Статус: фанат консоли (=
ОС: GNU/Debian, RHEL

Re: Решено: анонимный ftp

Сообщение SLEDopit »

karpos писал(а):
23.10.2013 20:56
полностью скопировал твой конфиг он ругается на эту строчку allow_writeable_chroot=YES
версия vsftpd? эта опция появилась после 3.0.что-то-там. хотя ругаться на writeable chroot начало ещё в 2.3.5.
karpos писал(а):
23.10.2013 21:13
пишут что надо корневой папке чтение запись запретить только как я не пойму.
chmod a-w /var/ftp . но тогда в корень невозможно будет ничего записать или создать каталог по фтп. надо будет заранее создать нужные директории и уже в них записывать.
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don't do mistakes, the more bugs are in your code.
Спасибо сказали:
Ism
Сообщения: 1261
Статус: Никто, по сути быдло

Re: Решено: анонимный ftp

Сообщение Ism »

SLEDopit писал(а):
23.10.2013 22:12
karpos писал(а):
23.10.2013 20:56
полностью скопировал твой конфиг он ругается на эту строчку allow_writeable_chroot=YES
версия vsftpd? эта опция появилась после 3.0.что-то-там. хотя ругаться на writeable chroot начало ещё в 2.3.5.
karpos писал(а):
23.10.2013 21:13
пишут что надо корневой папке чтение запись запретить только как я не пойму.
chmod a-w /var/ftp . но тогда в корень невозможно будет ничего записать или создать каталог по фтп. надо будет заранее создать нужные директории и уже в них записывать.

Воо, всё только начинается, ещё у vsftpd есть какието модули и если чтото не подключится то начинается НЁХ
Спасибо сказали:
karpos
Сообщения: 50
ОС: archlinux

Re: Решено: анонимный ftp

Сообщение karpos »

версия vsftpd vsftpd.i686 0:2.2.2-11.el6_4.1
Спасибо сказали:
karpos
Сообщения: 50
ОС: archlinux

Re: Решено: анонимный ftp

Сообщение karpos »

ну как сделать так чтоб в корень не писал в другие директорий писал.я поставил на /var/ftp 555 а на /var/ftp/1 755 все равно пароль просит.
Спасибо сказали:
karpos
Сообщения: 50
ОС: archlinux

Re: Решено: анонимный ftp

Сообщение karpos »

ВСЕМ спасибо мой конфиг заработал на версий vsftpd.i686 0:2.3.5-2.el6 вот в корень он не пишет а во все другие пишет. как тут плюсануть.
Спасибо сказали: