Command Line FTP


This article provides instructions for configuring the Command Line FTP client to work with Egnyte. For background information about uploading files using FTP, and access to other FTP configuration guides, please read this article.

Exclusions: Please refer to this article for unsupported characters and excluded file types that will not be synced. 





cURL can be easily used to transfer files using FTP protocol and with SSL.

A prototype:

curl -k -T <file> --ftp-ssl --ftp-pasv -u "<egnyte-user>\mce_markerlt;egnyte-domain>:<egnyte-password>" ftp://ftp-<egnyte-domain>

For example if you have to transfer a local file called testfile.txt and you want to upload to the root of your FTP directory:

curl -k -T testfile.txt --ftp-ssl --ftp-pasv -u "username\$domain:password"

Creating a directory:

curl -k -Q "MKD /Shared/testdirectory" --ftp-ssl --ftp-pasv -u "username\$domain:password"

Uploading file to the created directory:

curl -k -T testfile.txt --ftp-ssl --ftp-pasv -u "username\$domain:password"

You can FTP files into a folder under Shared using a script:

Here is a simple curl :

curl --user <username>@<domain_name>:<password> -T <File Path> ftp://ftp-<domain_name> 

/Shared/mybackup should be valid directory that already exists.

To Download

For Download -
curl -k --ftp-ssl --ftp-pasv -u "<username>\$<domainName without>:<password>" ftp://<ftp url>/Shared/Documents/<filename>

Please replace <username> with the actual Egnyte username. 

Please replace <domain> with the actual Egnyte domain.

Please replace <password> with the actual Egnyte password.

You can carefully script each basic operation needed. For a simple operation of backing up log files, you can run a script once each day that creates a directory representing that day (date-time) and upload log files to that directory on FTP and over SSL.

You can avoid including the plain text password in the curl command, for example:

curl -k -T testfile.txt --ftp-ssl --ftp-pasv -u "username\$domain"

Will then prompt you for a password before starting transfer. 




We recommend using the standard Linux sshpass command line utility for scripting. It is necessary to ensure proper access to the local file containing the authentication information (password). After that, if, for instance, your SSH password is stored within a file ~/.ssh/secret, you can use the following command line to connect to Egnyte SFTP:

$ sshpass -f ~/.ssh/secret sftp 'username$domain'
Connected to

Here, domain should be replaced with your real domain and username replaced with your real Egnyte username. 

Egnyte Community

Egnyte Community

Want to connect with other Egnyte users and our Egnyte team? Share ideas and ask questions in our Community .