rclone挂载webdav
1、首先先下载
sudo apt install fuse3 ## 安装fuse3
sudo curl https://rclone.org/install.sh | sudo bash ## 安装rclone
2、然后开始配置rclone
2.1、输入命令进行配置
rclone config
2.2、提示找不到挂载存储,是否要创建?
输入:n
开始创建
root@DebianServer:~# rclone config
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
2.3、选择存储类型
要配置的存储类型。
从下面选择一个数字,或键入自己的值
Enter name for new remote.
name> webdav
Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
1 / 1Fichier
\ (fichier)
2 / Akamai NetStorage
\ (netstorage)
3 / Alias for an existing remote
\ (alias)
4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Outscale, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, Selectel, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
\ (s3)
5 / Backblaze B2
\ (b2)
6 / Better checksums for other remotes
\ (hasher)
7 / Box
\ (box)
8 / Cache a remote
\ (cache)
9 / Citrix Sharefile
\ (sharefile)
10 / Cloudinary
\ (cloudinary)
......................................
我是webdav所以直接输入webdav,也可以输入提示的数字
Storage> webdav
Option url.
URL of http host to connect to.
E.g. https://example.com.
Enter a value.
2.4、输入你webdav的地址
输入url
我是测试地址本地的
url> http://192.168.8.144:8882/
Option vendor.
2.5、输入服务名称
从下面选择一个数字,或键入自己的值。
按Enter键留空
我这边输入的是other 其他
Name of the WebDAV site/service/software you are using.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / Fastmail Files
\ (fastmail)
2 / Nextcloud
\ (nextcloud)
3 / Owncloud
\ (owncloud)
4 / Sharepoint Online, authenticated by Microsoft account
\ (sharepoint)
5 / Sharepoint with NTLM authentication, usually self-hosted or on-premises
\ (sharepoint-ntlm)
6 / rclone WebDAV server to serve a remote over HTTP via the WebDAV protocol
\ (rclone)
7 / Other site/service or software
\ (other)
vendor> other
2.6、输入webdav的用户名
Option user.
User name.
In case NTLM authentication is used, the username should be in the format 'Domain\User'.
Enter a value. Press Enter to leave empty.
user> webdavuser
2.7、输入webdav的密码
输入两遍
Option pass.
Password.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, leave this optional password blank (default)
y/g/n> y
Enter the password:
password:
Confirm the password:
password:
2.8、是否使用令牌
输入n
Option bearer_token.
Bearer token instead of user/pass (e.g. a Macaroon).
Enter a value. Press Enter to leave empty.
bearer_token> n
2.9、是否要高级设置
输入n
Edit advanced config?
y) Yes
n) No (default)
y/n> n
2.10、配置完成
输入y
Configuration complete.
Options:
- type: webdav
- url: http://192.168.8.144:8882/
- vendor: other
- user: liuweb
- pass: *** ENCRYPTED ***
- bearer_token: n
Keep this "webdav" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
提示建立成功webdv,输入q
Current remotes:
Name Type
==== ====
webdav webdav
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>
2.11、验证是否建立成功
root@DebianServer:/mnt# rclone lsd webdav:/ --max-depth 1
-1 2025-03-07 19:58:50 -1 Android
-1 2025-03-14 21:02:20 -1 Down
-1 2025-03-07 23:25:10 -1 Video
-1 2025-03-10 13:23:10 -1 Videos
-1 2025-03-02 20:36:35 -1 aspnet_client
-1 2025-03-05 20:34:38 -1 music
-1 2025-03-09 15:17:39 -1 工具
-1 2025-03-11 22:37:43 -1 音乐
3、开始挂载
3.1、新建一个文件夹挂载到这个文件夹
mkdir --mode=777 /mnt/webdav
rclone mount webdav:/ /mnt/webdav --vfs-cache-mode full &
3.2、验证是否挂载成功
root@DebianServer:~# ls /mnt/webdav/
Android 'OEP1025DN-'$'\344\270\223\347\224\250''-'$'\351\223\266\346\262\263\351\272\222\351\272\237''V10.rar' Videos music ''$'\345\267\245\345\205\267'
Down Video aspnet_client web.config ''$'\351\237\263\344\271\220'
成功挂载
3.3、卸载命令
fusermount -qzu /mnt/webdav/