vsftpd на RHel 550 Failed to change directory

Есть и такой ОС.

Модератор: weec

Правила форума
Убедительная просьба юзать теги [cоde] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Talay
мл. сержант
Сообщения: 74
Зарегистрирован: 2012-06-19 7:59:58

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение Talay » 2015-02-18 15:56:54

Здравствуйте,

только что установил RedHat.
устанвил vsftpd. настроил и как положено открывается все.
при открытии или заливки файла ошибка выходит:
в виндовс: 550 Failed to change directory
в тотал коммандаре: 550 failed to open file

Директорию выше все файлы видны и просматриваются и качаются

перерыл все. ничего не помогает.
/etc/passswd:
ftpnesa:x:1001:1001:FTP user:/home/ftp:/sbin/nologin

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

# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
#xferlog_file=/var/log/xferlog
#
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=NO
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_local_user=NO
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd with two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=NO
tcp_wrappers=YES


Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35454
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение Alex Keda » 2015-02-18 18:32:24

Отладочный лог?
Права на файл?
Убей их всех! Бог потом рассортирует...

Talay
мл. сержант
Сообщения: 74
Зарегистрирован: 2012-06-19 7:59:58

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение Talay » 2015-02-19 23:51:10

фтп уже открывается, права к папкам неправильно было.
теперь файлы с оборудования вот так происходит. до этого работало. я переустановил систему и такая ошибка.
Red Hat Enterprise Linux Server release 7.0 (Maipo)

права к папкам

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

[root@data log]# ls -all /home/ftpnesa/
total 61564
drwxrwxrwx. 8 ftpnesa ftpnesa     4096 Feb 19 20:32 .
drwxr-xr-x. 5 root    root          60 Feb 18 16:15 ..
-rwxrwxr-x. 1 ftpnesa ftpnesa       18 Sep 25 15:57 .bash_logout
-rwxrwxr-x. 1 ftpnesa ftpnesa      193 Sep 25 15:57 .bash_profile
-rwxrwxr-x. 1 ftpnesa ftpnesa      231 Sep 25 15:57 .bashrc
drwxrwxr-x. 2 ftpnesa ftpnesa        6 Feb 19 20:31 dat
drwxrwxr-x. 2 ftpnesa ftpnesa        6 Feb 19 20:31 data
-rw-r--r--. 1 ftpnesa ftpnesa 58601168 Feb 19 10:40 IE11-Windows6.1-x64-ru-ru.exe
drwxr-xr-x. 2 root    root           6 Feb 19 20:32 int
drwxrwxr-x. 2 ftpnesa ftpnesa        6 Feb 19 20:32 ist
drwxr-xr-x. 2 ftpnesa ftpnesa       31 Feb 19 10:51 konsol

[root@data log]# tail -f /var/log/vsftpd.log

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

Thu Feb 19 20:47:59 2015 [pid 9687] [ftpnesa] FTP command: Client "::ffff:91.192.66.30", "CLNT NcFTPPut 3.2.0 linux-armv4tl-glibc2.3"
Thu Feb 19 20:47:59 2015 [pid 9687] [ftpnesa] FTP response: Client "::ffff:91.192.66.30", "500 Unknown command."
Thu Feb 19 20:47:59 2015 [pid 9687] [ftpnesa] FTP command: Client "::ffff:91.192.66.30", "CWD /ist"
Thu Feb 19 20:47:59 2015 [pid 9687] [ftpnesa] FTP response: Client "::ffff:91.192.66.30", "550 Failed to change directory."
Thu Feb 19 20:47:59 2015 [pid 9687] [ftpnesa] FTP command: Client "::ffff:91.192.66.30", "CWD /"
Thu Feb 19 20:47:59 2015 [pid 9687] [ftpnesa] FTP response: Client "::ffff:91.192.66.30", "250 Directory successfully changed."
Thu Feb 19 20:47:59 2015 [pid 9687] [ftpnesa] FTP command: Client "::ffff:91.192.66.30", "CWD ist"
Thu Feb 19 20:47:59 2015 [pid 9687] [ftpnesa] FTP response: Client "::ffff:91.192.66.30", "550 Failed to change directory."
Thu Feb 19 20:48:00 2015 [pid 9687] [ftpnesa] FTP command: Client "::ffff:91.192.66.30", "QUIT"
Thu Feb 19 20:48:00 2015 [pid 9687] [ftpnesa] FTP response: Client "::ffff:91.192.66.30", "221 Goodbye."

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35454
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение Alex Keda » 2015-02-20 8:16:09

А чё не так-то?
Убей их всех! Бог потом рассортирует...

Talay
мл. сержант
Сообщения: 74
Зарегистрирован: 2012-06-19 7:59:58

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение Talay » 2015-02-20 10:13:29

Alex Keda,

в корень заходит норм:
91.192.66.30", "CWD /"
91.192.66.30", "250 Directory successfully
дальше папка в корне
91.192.66.30", "CWD ist"
91.192.66.30", "550 Failed to change directory."
91.192.66.30", "QUIT"
91.192.66.30", "221 Goodbye."

Из за этого я не получаю данные от датчика на свой ФТП

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35454
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение Alex Keda » 2015-02-20 11:45:48

А из ssh этим юзером туда заходит?
Убей их всех! Бог потом рассортирует...

Talay
мл. сержант
Сообщения: 74
Зарегистрирован: 2012-06-19 7:59:58

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение Talay » 2015-02-20 12:05:55

ssh закрывается.
IMG_20022015_150234.png
IMG_20022015_150234.png (6.97 КБ) 8598 просмотров

FiL
ст. лейтенант
Сообщения: 1374
Зарегистрирован: 2010-02-05 0:21:40

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение FiL » 2015-02-25 9:42:33

разницу между /ist и /home/ftpnesa/ist видите? Если нет, то попытайтесь еще раз. Как только увидите, так должно стать легче.

Andy
ст. лейтенант
Сообщения: 1117
Зарегистрирован: 2007-03-04 7:48:58
Откуда: Mytischi

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение Andy » 2015-02-26 13:45:59

Talay писал(а):ssh закрывается.
IMG_20022015_150234.png
Несколько вопросов:
- Для чего Вы ходите на ftp через ssh?
- Для чего нужно было создавать директорию ftp в /home?
Jul 16 19:37:15 freebsd sshd[4152]: Invalid user idiot from 210.75.200.104

Talay
мл. сержант
Сообщения: 74
Зарегистрирован: 2012-06-19 7:59:58

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение Talay » 2015-02-26 14:13:35

FiL,
понял свою ошибку ))

Andy,

по умолчанию тама создалось и там оставил.
главное заработало уже.

вопросик, к этому фтп другой пользователь как может зайти?

Andy
ст. лейтенант
Сообщения: 1117
Зарегистрирован: 2007-03-04 7:48:58
Откуда: Mytischi

vsftpd на RHel 550 Failed to change directory

Непрочитанное сообщение Andy » 2015-02-26 16:01:29

Talay писал(а): Andy,

по умолчанию тама создалось и там оставил.
главное заработало уже.

вопросик, к этому фтп другой пользователь как может зайти?
У системных пользователей, а судя по вопросу, это он и есть,
директория находится в /var/lib/, согласно Filesystem Hierarchy Standard.
Другой пользователь может зайти под логином и паролем учетной записи
ftpsama.

Отправлено спустя 1 час 23 минуты 4 секунды:
Talay писал(а):вопросик, к этому фтп другой пользователь как может зайти?
Если нужна файлопомойка:

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

# grep "^[^#]" /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
chown_uploads=YES
chroot_local_user=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
listen=YES
write_enable=YES
chown_username=ftp
chown_upload_mode=0644
# ls -lahi /var/ftp/ | grep pub
1049687 drwxrwxr-x  879 ftp  ftp  316K Feb 26 15:01 pub
# lftp -u anonymous 127.0.0.1
Password: 
lftp anonymous@127.0.0.1:~> cd pub/
lftp anonymous@127.0.0.1:/pub> mkdir talay
mkdir ok, `talay' created
lftp anonymous@127.0.0.1:/pub> ls | grep talay
drwx------    2 14       50           4096 Feb 26 13:00 talay
lftp anonymous@127.0.0.1:/pub>
Jul 16 19:37:15 freebsd sshd[4152]: Invalid user idiot from 210.75.200.104