Server Bug Fix: curl: (25) Failed FTP upload: 553 to vsftpd docker

Original Source Link

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" 

Sending file

$ curl --upload-file /tmp/ 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


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


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.

Tagged : / / / /

Leave a Reply

Your email address will not be published. Required fields are marked *