550 permission denied ftp

Поставил proftpd с webmin на вдс с Ubuntu 14.04
Создал аккаунт,подключаюсь,хочу отредактировать файл.
Выдает:
Команда: PASV
Ответ: 227 Entering Passive Mode (188,188,42,133,195,55).
Команда: STOR access.log
Ответ: 550 access.log: Permission denied
Ошибка: Критическая ошибка при передаче файлов

Сделал выводы,что проблемы с правами. Присвоил всем папкам права для ftp пользователя т.е.
chown -R ftpuser:ftpuser *

Да,в этом случаи по ftp все файлы записывает,но битрикс или вордпресс отказываются работать корректно,т.к. сами не могу записывать файлы,элементарно загрузить медифайл или установить плагин не удастся.

i’ve tried to create a script that will upload some file to a ftp server using lftp, but without any luck so far. If I used build in ftp command in debian I manage to succsessfully connected and put the file. Here is the debug output from lftp command:

As you can see I’m using stored user name and password from .netrc file. I have another script that connect to the same server but uploads files and rename them inside the remote ftp folder using lftp again. Can someone help and explain why I cannot put with lfpt but can do it using ftp.

3 Answers 3

While 550 Permission denied. is a strange response to the EPSV command it means that the server or some middlebox in between does not understand the EPSV command (likely a middlebox since the response to FEAT shows EPSV as supported). If you use the builtin ftp command instead of lftp it will probably use the older PASV command (IPv4 only) instead of the newer EPSV command (IPv4+IPv6 capable).

According to the man page there is a setting ftp:prefer-epsv which should default to false . Maybe some configuration is setting this value to true so that lftp will use EPSV instead of PASV . Check your settings ( set -a inside lftp) and if it is true (expected) set it to false and try again, in the hope that it will then use PASV instead of EPSV .

after add set ftp:passive-mode true and set ftp:prefer-epsv false to /etc/lftp.conf the error is changed

Okay I’ve understand what ALLO means

The ALLO command may be sent to a server that requires the necessary space for an uploaded to be reserved before the transfer takes place

so after a quick search in ftp man page, I’ve found a command to shut it down. After adding set ftp:use-allo false and with epsv false everything is fine now. Thanks alot 🙂

A blog about IT Development and Operations

Introduction

Out of the box, the ‘vsftpd’ server doesn’t allow you to write data to the server. To allow this, you must change the vsftpd configuration and then restart the service.

The Problem

After you’ve installed VSFTPD (on Ubuntu: ‘apt-get install vsftpd’) you can download files using FTP from your VSFTPD server. However, if you try to write files back to your server you get this error:

The Solution

To solve this, edit your vsftpd.conf file:

…and uncomment the write_enable line to look like this:

Once uncommented, restart your VSFTPD service:

…and you should now be able to write files to your FTP server. If you still have trouble, ensure you have the correct filesystem permissions for the user you are FTP’ing as.

Оцените статью