Accessing Egnyte WebDAV Programatically

Updated 9/5/2013


The WebDAV protocol is based on, and extends, the HTTP protocol; Egnyte currently provides WebDAV based programmatic and command line access to the /Shared and /Private folders on the Cloud File Server (CFS).  This article describes how you can connect to Egnyte programatically via WebDAV.

In another article, we describe how to connect with Egnyte via our public RESTful APIs. You can also access our developer's page for more detailed information about these REST APIs.

WebDAV access is limited to Admins and Power Users.


Our WebDAV service supports basic file operations such as uploading files, creating folders and modifying the folder structure through its protocol methods.

Cloud File Server Operation

WebDAV Protocol Method

Download file


Upload file


Folder listing


Create Folder


Copy file or folder


Move or renaming a  file or folder


Lock file


Unlock file


cURL, a popular project, provides both a client library and a command line tool that can be used to access Egnyte over WebDAV. Other client libraries are also available for most programming languages and platforms.

cURL command line to access Egnyte services

In the following illustrative commands, we are using as your Egnyte Cloud File Server domain.

List Folder Content

curl --request PROPFIND -v --user <egnyte-username>@acme:<egnyte-password> 

Download File 

curl --request GET -v --user <egnyte-username>@acme:<egnyte-password> > Q1.xls

Here the Q_Report.xls file from your /Shared/Finance folder will be downloaded and saved to Q1.xls in the current folder.

Upload File

To upload a local file Q2.xls form the current local folder to /Shared/Finance -

curl --request PUT --data-binary "@Q2.xls"  -v --user  <egnyte-username>@acme:<egnyte-password>

Create Folder

To create a folder /Shared/Marketing

curl request MKCOL -v --user <egnyte-username>@acme:<egnyte-password> 

Lock File  

To lock a file /Shared/Marketing/fin_res.ppt

curl request LOCK -v --user <egnyte-username>@acme:<egnyte-password>

Unlock File

To unlock file /Shared/Marketing/fin_res.ppt

curl --request UNLOCK -v –user <egnyte-username>@acme:<egnyte-password>

Rename/Move File or Folder

To rename/move /Shared/Marketing/2009 to /Shared/Marketing/2010

curl --request MOVE --user <egnyte-username>@acme:<egnyte-password> -H Destination:" -" --insecure --silent --show-error --stderr -

Copy File or Folder

To copy /Shared/Marketing/2009 to /Shared/Marketing/2010

curl --request COPY --user <egnyte-username>@acme:<egnyte-password> -H Destination:" -" --insecure --silent --show-error --stderr -

Was this article helpful?
8 out of 8 found this helpful
Have more questions? Submit a request


Article is closed for comments.