2

I'm running you container and try to send files using curl but it fails.

Running the container

export FTP_USER="test"
export FTP_PASSWORD="test"

docker run \
    --name mock_ftp_server \
    --publish 21:21 \
    --publish 4559-4564:4559-4564 \
    --env FTP_USER="$FTP_USER" \
    --env FTP_PASSWORD="$FTP_PASSWORD" \
    --detach \
  panubo/vsftpd

Sending file

$ curl --upload-file /tmp/mock.data-2017-03-28.tar.gz ftp://localhost --user $FTP_USER:$FTP_PASSWORD
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (25) Failed FTP upload: 553

Question

What's the matter here? Do I need to add something?

related

1 Answer 1

1

Based on VSFTPD 553 error: could not create file on AskUbuntu I fixed it by changing the owner of the root directory (/srv/) to the FTP user ftp:

docker run …
docker exec mock_ftp_server chown ftp:ftp -R /srv/
curl …

I'm waiting for information about security for this solution.

1
  • Hey... What if we have multiple FTP users that need to access the same file? :( Commented Dec 7, 2022 at 17:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.