October 22, 2017

Alfresco tips and tricks – #8 FTP upload from command line using CURL

Here is a tip useful for systems with no GUI. To upload/download files to/from Alfresco you can use a FTP command line tool like curl. Follows the Alfresco FTP Server configuration in the alfresco-global.properties file.

 

giuseppe-urso-alfresco-ftp-with-curl-02

giuseppe-urso-alfresco-ftp-with-curl-01

3 Comments

  1. Giuseppe Urso

    1. USING THE PASSWORD PROMPT:
    > curl -u “admin” -v -T test.txt ftp://localhost:2121/Alfresco/

    2. USING A PLAIN TEXT FILE
    > cat password.txt | sed ‘s/^/user=”admin:/;s/$/\”/’ | curl -K – -v -T test.txt ftp://localhost:2121/Alfresco/

    3. USING FTP CLIENT
    > ftp localhost 2121

    NOTE: Use the “-K” option to tell curl to read parameters from a file or stdin to which you can pass the secret info.
    In every case always remember that FTP is not a secure protocol. FTP passwords are sent in clear across the network therefore a MITM attack can easly steals the user’s credentials. 

    Reply
  2. Tjarda Peelen

    Thank you very much! (Altough it is a catagory RTFM… sorry or that…) Thanks for your Tips’n’Tricks!

    Reply

Leave a Reply

Your email address will not be published.