2017-10-02 21:29:23 +02:00
|
|
|
---
|
|
|
|
title: "WebDAV"
|
|
|
|
description: "Rclone docs for WebDAV"
|
|
|
|
date: "2017-10-01"
|
|
|
|
---
|
|
|
|
|
|
|
|
<i class="fa fa-globe"></i> WebDAV
|
|
|
|
-----------------------------------------
|
|
|
|
|
|
|
|
Paths are specified as `remote:path`
|
|
|
|
|
|
|
|
Paths may be as deep as required, eg `remote:directory/subdirectory`.
|
|
|
|
|
|
|
|
To configure the WebDAV remote you will need to have a URL for it, and
|
|
|
|
a username and password. If you know what kind of system you are
|
|
|
|
connecting to then rclone can enable extra features.
|
|
|
|
|
|
|
|
Here is an example of how to make a remote called `remote`. First run:
|
|
|
|
|
|
|
|
rclone config
|
|
|
|
|
|
|
|
This will guide you through an interactive setup process:
|
|
|
|
|
|
|
|
```
|
|
|
|
No remotes found - make a new one
|
|
|
|
n) New remote
|
|
|
|
s) Set configuration password
|
|
|
|
q) Quit config
|
|
|
|
n/s/q> n
|
|
|
|
name> remote
|
|
|
|
Type of storage to configure.
|
|
|
|
Choose a number from below, or type in your own value
|
2018-06-25 17:03:36 +02:00
|
|
|
[snip]
|
|
|
|
22 / Webdav
|
2017-10-02 21:29:23 +02:00
|
|
|
\ "webdav"
|
2018-06-25 17:03:36 +02:00
|
|
|
[snip]
|
2017-10-02 21:29:23 +02:00
|
|
|
Storage> webdav
|
|
|
|
URL of http host to connect to
|
|
|
|
Choose a number from below, or type in your own value
|
|
|
|
1 / Connect to example.com
|
|
|
|
\ "https://example.com"
|
|
|
|
url> https://example.com/remote.php/webdav/
|
2018-06-25 17:03:36 +02:00
|
|
|
Name of the Webdav site/service/software you are using
|
2017-10-02 21:29:23 +02:00
|
|
|
Choose a number from below, or type in your own value
|
|
|
|
1 / Nextcloud
|
|
|
|
\ "nextcloud"
|
|
|
|
2 / Owncloud
|
|
|
|
\ "owncloud"
|
2018-04-09 10:05:43 +02:00
|
|
|
3 / Sharepoint
|
|
|
|
\ "sharepoint"
|
|
|
|
4 / Other site/service or software
|
2017-10-02 21:29:23 +02:00
|
|
|
\ "other"
|
|
|
|
vendor> 1
|
|
|
|
User name
|
|
|
|
user> user
|
|
|
|
Password.
|
|
|
|
y) Yes type in my own password
|
|
|
|
g) Generate random password
|
|
|
|
n) No leave this optional password blank
|
|
|
|
y/g/n> y
|
|
|
|
Enter the password:
|
|
|
|
password:
|
|
|
|
Confirm the password:
|
|
|
|
password:
|
2018-06-25 17:03:36 +02:00
|
|
|
Bearer token instead of user/pass (eg a Macaroon)
|
|
|
|
bearer_token>
|
2017-10-02 21:29:23 +02:00
|
|
|
Remote config
|
|
|
|
--------------------
|
|
|
|
[remote]
|
2018-06-25 17:03:36 +02:00
|
|
|
type = webdav
|
2017-10-02 21:29:23 +02:00
|
|
|
url = https://example.com/remote.php/webdav/
|
|
|
|
vendor = nextcloud
|
|
|
|
user = user
|
|
|
|
pass = *** ENCRYPTED ***
|
2018-06-25 17:03:36 +02:00
|
|
|
bearer_token =
|
2017-10-02 21:29:23 +02:00
|
|
|
--------------------
|
|
|
|
y) Yes this is OK
|
|
|
|
e) Edit this remote
|
|
|
|
d) Delete this remote
|
|
|
|
y/e/d> y
|
|
|
|
```
|
|
|
|
|
|
|
|
Once configured you can then use `rclone` like this,
|
|
|
|
|
|
|
|
List directories in top level of your WebDAV
|
|
|
|
|
|
|
|
rclone lsd remote:
|
|
|
|
|
|
|
|
List all the files in your WebDAV
|
|
|
|
|
|
|
|
rclone ls remote:
|
|
|
|
|
|
|
|
To copy a local directory to an WebDAV directory called backup
|
|
|
|
|
|
|
|
rclone copy /home/source remote:backup
|
|
|
|
|
|
|
|
### Modified time and hashes ###
|
|
|
|
|
|
|
|
Plain WebDAV does not support modified times. However when used with
|
|
|
|
Owncloud or Nextcloud rclone will support modified times.
|
|
|
|
|
2019-01-27 14:33:21 +01:00
|
|
|
Likewise plain WebDAV does not support hashes, however when used with
|
2019-03-27 20:12:24 +01:00
|
|
|
Owncloud or Nextcloud rclone will support SHA1 and MD5 hashes.
|
2019-01-27 14:33:21 +01:00
|
|
|
Depending on the exact version of Owncloud or Nextcloud hashes may
|
|
|
|
appear on all objects, or only on objects which had a hash uploaded
|
|
|
|
with them.
|
2017-10-02 21:29:23 +02:00
|
|
|
|
2018-10-01 21:48:54 +02:00
|
|
|
<!--- autogenerated options start - DO NOT EDIT, instead edit fs.RegInfo in backend/webdav/webdav.go then run make backenddocs -->
|
|
|
|
### Standard Options
|
|
|
|
|
|
|
|
Here are the standard options specific to webdav (Webdav).
|
|
|
|
|
|
|
|
#### --webdav-url
|
|
|
|
|
|
|
|
URL of http host to connect to
|
|
|
|
|
|
|
|
- Config: url
|
|
|
|
- Env Var: RCLONE_WEBDAV_URL
|
|
|
|
- Type: string
|
|
|
|
- Default: ""
|
|
|
|
- Examples:
|
|
|
|
- "https://example.com"
|
|
|
|
- Connect to example.com
|
|
|
|
|
|
|
|
#### --webdav-vendor
|
|
|
|
|
|
|
|
Name of the Webdav site/service/software you are using
|
|
|
|
|
|
|
|
- Config: vendor
|
|
|
|
- Env Var: RCLONE_WEBDAV_VENDOR
|
|
|
|
- Type: string
|
|
|
|
- Default: ""
|
|
|
|
- Examples:
|
|
|
|
- "nextcloud"
|
|
|
|
- Nextcloud
|
|
|
|
- "owncloud"
|
|
|
|
- Owncloud
|
|
|
|
- "sharepoint"
|
|
|
|
- Sharepoint
|
|
|
|
- "other"
|
|
|
|
- Other site/service or software
|
|
|
|
|
|
|
|
#### --webdav-user
|
|
|
|
|
|
|
|
User name
|
|
|
|
|
|
|
|
- Config: user
|
|
|
|
- Env Var: RCLONE_WEBDAV_USER
|
|
|
|
- Type: string
|
|
|
|
- Default: ""
|
|
|
|
|
|
|
|
#### --webdav-pass
|
|
|
|
|
|
|
|
Password.
|
|
|
|
|
|
|
|
- Config: pass
|
|
|
|
- Env Var: RCLONE_WEBDAV_PASS
|
|
|
|
- Type: string
|
|
|
|
- Default: ""
|
|
|
|
|
|
|
|
#### --webdav-bearer-token
|
|
|
|
|
|
|
|
Bearer token instead of user/pass (eg a Macaroon)
|
|
|
|
|
|
|
|
- Config: bearer_token
|
|
|
|
- Env Var: RCLONE_WEBDAV_BEARER_TOKEN
|
|
|
|
- Type: string
|
|
|
|
- Default: ""
|
|
|
|
|
|
|
|
<!--- autogenerated options stop -->
|
2018-10-01 19:36:15 +02:00
|
|
|
|
2018-06-25 17:03:36 +02:00
|
|
|
## Provider notes ##
|
|
|
|
|
|
|
|
See below for notes on specific providers.
|
|
|
|
|
2017-10-02 21:29:23 +02:00
|
|
|
### Owncloud ###
|
|
|
|
|
|
|
|
Click on the settings cog in the bottom right of the page and this
|
|
|
|
will show the WebDAV URL that rclone needs in the config step. It
|
|
|
|
will look something like `https://example.com/remote.php/webdav/`.
|
|
|
|
|
|
|
|
Owncloud supports modified times using the `X-OC-Mtime` header.
|
|
|
|
|
|
|
|
### Nextcloud ###
|
|
|
|
|
|
|
|
This is configured in an identical way to Owncloud. Note that
|
|
|
|
Nextcloud does not support streaming of files (`rcat`) whereas
|
|
|
|
Owncloud does. This [may be
|
|
|
|
fixed](https://github.com/nextcloud/nextcloud-snap/issues/365) in the
|
|
|
|
future.
|
2017-10-23 13:13:01 +02:00
|
|
|
|
2018-06-25 17:03:36 +02:00
|
|
|
### Put.io ###
|
2017-10-23 13:13:01 +02:00
|
|
|
|
|
|
|
put.io can be accessed in a read only way using webdav.
|
|
|
|
|
|
|
|
Configure the `url` as `https://webdav.put.io` and use your normal
|
|
|
|
account username and password for `user` and `pass`. Set the `vendor`
|
|
|
|
to `other`.
|
|
|
|
|
|
|
|
Your config file should end up looking like this:
|
|
|
|
|
|
|
|
```
|
|
|
|
[putio]
|
|
|
|
type = webdav
|
|
|
|
url = https://webdav.put.io
|
|
|
|
vendor = other
|
|
|
|
user = YourUserName
|
|
|
|
pass = encryptedpassword
|
|
|
|
```
|
|
|
|
|
|
|
|
If you are using `put.io` with `rclone mount` then use the
|
|
|
|
`--read-only` flag to signal to the OS that it can't write to the
|
|
|
|
mount.
|
|
|
|
|
|
|
|
For more help see [the put.io webdav docs](http://help.put.io/apps-and-integrations/ftp-and-webdav).
|
2018-04-09 10:05:43 +02:00
|
|
|
|
2018-06-25 17:03:36 +02:00
|
|
|
### Sharepoint ###
|
2018-04-09 10:05:43 +02:00
|
|
|
|
2018-06-25 17:03:36 +02:00
|
|
|
Rclone can be used with Sharepoint provided by OneDrive for Business
|
2018-04-09 10:05:43 +02:00
|
|
|
or Office365 Education Accounts.
|
|
|
|
This feature is only needed for a few of these Accounts,
|
|
|
|
mostly Office365 Education ones. These accounts are sometimes not
|
|
|
|
verified by the domain owner [github#1975](https://github.com/ncw/rclone/issues/1975)
|
|
|
|
|
|
|
|
This means that these accounts can't be added using the official
|
|
|
|
API (other Accounts should work with the "onedrive" option). However,
|
|
|
|
it is possible to access them using webdav.
|
|
|
|
|
|
|
|
To use a sharepoint remote with rclone, add it like this:
|
|
|
|
First, you need to get your remote's URL:
|
|
|
|
|
|
|
|
- Go [here](https://onedrive.live.com/about/en-us/signin/)
|
|
|
|
to open your OneDrive or to sign in
|
|
|
|
- Now take a look at your address bar, the URL should look like this:
|
|
|
|
`https://[YOUR-DOMAIN]-my.sharepoint.com/personal/[YOUR-EMAIL]/_layouts/15/onedrive.aspx`
|
|
|
|
|
|
|
|
You'll only need this URL upto the email address. After that, you'll
|
|
|
|
most likely want to add "/Documents". That subdirectory contains
|
|
|
|
the actual data stored on your OneDrive.
|
|
|
|
|
|
|
|
Add the remote to rclone like this:
|
|
|
|
Configure the `url` as `https://[YOUR-DOMAIN]-my.sharepoint.com/personal/[YOUR-EMAIL]/Documents`
|
|
|
|
and use your normal account email and password for `user` and `pass`.
|
|
|
|
If you have 2FA enabled, you have to generate an app password.
|
|
|
|
Set the `vendor` to `sharepoint`.
|
|
|
|
|
|
|
|
Your config file should look like this:
|
|
|
|
|
|
|
|
```
|
|
|
|
[sharepoint]
|
|
|
|
type = webdav
|
|
|
|
url = https://[YOUR-DOMAIN]-my.sharepoint.com/personal/[YOUR-EMAIL]/Documents
|
|
|
|
vendor = other
|
|
|
|
user = YourEmailAddress
|
|
|
|
pass = encryptedpassword
|
2018-06-25 17:03:36 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### dCache ###
|
|
|
|
|
2019-01-15 10:21:34 +01:00
|
|
|
[dCache](https://www.dcache.org/) is a storage system with WebDAV doors that support, beside basic and x509,
|
2018-07-05 11:04:57 +02:00
|
|
|
authentication with [Macaroons](https://www.dcache.org/manuals/workshop-2017-05-29-Umea/000-Final/anupam_macaroons_v02.pdf) (bearer tokens).
|
|
|
|
|
2018-06-25 17:03:36 +02:00
|
|
|
Configure as normal using the `other` type. Don't enter a username or
|
|
|
|
password, instead enter your Macaroon as the `bearer_token`.
|
|
|
|
|
|
|
|
The config will end up looking something like this.
|
|
|
|
|
|
|
|
```
|
|
|
|
[dcache]
|
|
|
|
type = webdav
|
|
|
|
url = https://dcache...
|
|
|
|
vendor = other
|
|
|
|
user =
|
|
|
|
pass =
|
|
|
|
bearer_token = your-macaroon
|
|
|
|
```
|
2018-07-05 11:04:57 +02:00
|
|
|
|
2019-01-15 10:21:34 +01:00
|
|
|
There is a [script](https://github.com/sara-nl/GridScripts/blob/master/get-macaroon) that
|
2018-07-05 11:04:57 +02:00
|
|
|
obtains a Macaroon from a dCache WebDAV endpoint, and creates an rclone config file.
|