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.
### FTP Server Configuration ### ftp.enabled=true ftp.port=2121 # The default root path for FTP Server protocols.rootPath=/${spaces.company_home.childname} filesystem.rootPath=${protocols.rootPath} # Possible values for the FTP debugging: # STATE, RXDATA, TXDATA, DUMPDATA, SEARCH, INFO, FILE, FILEIO, # ERROR, PKTTYPE, TIMING, DATAPORT, DIRECTORY, SSL ftp.sessionDebug=
$ curl -v -T test-file.txt ftp://admin:admin@localhost:2121/Alfresco/
How would you do so without putting the username:password in the command line??
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.
Thank you very much! (Altough it is a catagory RTFM… sorry or that…) Thanks for your Tips’n’Tricks!
Hi,
Thanks so much for your great blog!
I have a question, Can I use SFTP instead of FTP?
Hi,
I think there isn’t any support at the moment for SFTP (SSH FTP) but I’m sure alfresco supports FTP over SSL/TLS (FTPS), take a look here:
https://docs.alfresco.com/5.2/concepts/fileserv-ftp-props.html
How Can I Define the path, for example I have three sites named, “IT, Networking, Security” and I want to send files to these sites. How can I define or where can I look what is the path to do it in command line?
Thanks
Use a common FTP client like Filezilla to access Alfresco and browse the repository. Site documents are located here: /alfresco/sites//documentLibrary
Hi Giuseppe,
Thanks for your help.
I could not find the sites via command line, Do you know the exact location? Please look my path of installation and there does not exist.
Do you have any idea?
Image: http://prntscr.com/jzs3xm
Thanks so much.
Pay attention: path you are looking for has nothing to do with the alfresco installation. Forget the installation path on your disk and try first to browse the alfresco repository via Filezilla. After you logged in, you will easly browse the alfresco repository.
If you don’t want to use Filezilla, open your browser and go to something like
http://localhost:8080/share/page/repository