这不一大早醒来发现OneDrive的文件全变成只读

这时大家肯定想到用https://mover.io/ rclone api等方法挂载OneDrive来转移文件 但是大部分人的账号出现只读后不能使用这二个工具
但是Webdav应该都可以用吧 我的账号出现只读后还是可以用Webdav的
这时 我们只需要准备一台Azure的机器安装上Rclone Webdav来对拷即可
机器配置1H2G即可 硬盘选64G 默认30G应该也够用 无需太高 实测这个配置完全够用

Rclone Webdav配置文件如下

#挂载OneDrive为Webdav 适用于无api及只读状态
1、新建配置文件
rclone config
选择WebDAV
输入:https://cxxx-my.sharepoint.com/personal/xy-n_mxxxx_org/Documents

root@Test1:/usr/sju/sh# rclone config #新建配置文件
Current remotes:

Name                 Type
====                 ====
cxxx_backup          onedrive
sharepoint           webdav
xy-23-02             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> n

Enter name for new remote.
name> xy-n #填写配置文件名称

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.

46 / WebDAV
   \ (webdav)
47 / Yandex Disk
   \ (yandex)
48 / Zoho
   \ (zoho)
49 / premiumize.me
   \ (premiumizeme)
50 / seafile
   \ (seafile)
Storage> 46 #选择挂载类型WebDAV

Option url.
URL of http host to connect to.
E.g. https://example.com.
Enter a value.
url> https://cxxx-my.sharepoint.com/personal/xy-n_mxxxx_org/Documents #填写url

Option vendor.
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 / Nextcloud
   \ (nextcloud)
2 / Owncloud
   \ (owncloud)
3 / Sharepoint Online, authenticated by Microsoft account
   \ (sharepoint)
4 / Sharepoint with NTLM authentication, usually self-hosted or on-premises
   \ (sharepoint-ntlm)
5 / Other site/service or software
   \ (other)
vendor> 4 #OneDrive选择Sharepoint

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> xy-n@mxxxx.org #输入OneDrive账号

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 #选y 输入OneDrive的密码
Enter the password:
password: #输入密码 盲打 屏幕不显示
Confirm the password:
password:

Option bearer_token.
Bearer token instead of user/pass (e.g. a Macaroon).
Enter a value. Press Enter to leave empty.
bearer_token> #按回车 默认即可

Edit advanced config?
y) Yes
n) No (default)
y/n> n #按n 不进行高级配置

Configuration complete.
Options:
- type: webdav
- url: https://cxxx-my.sharepoint.com/personal/xy-n_mxxxx_org/Documents
- vendor: sharepoint-ntlm
- user: xy-n@mxxxx.org
- pass: *** ENCRYPTED ***
Keep this "xy-n" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y #确认配置文件 确认无误按y即可

Current remotes:

Name                 Type
====                 ====
cxxx_backup          onedrive
sharepoint           webdav
xy-23-02             webdav
xy-n                 webdav

#这是刚创建的配置文件 不能直接用 需要手动修改vendor的值为sharepoint默认创建好的是sharepoint-ntlm
[xy-n]
type = webdav
url = https://cxxx-my.sharepoint.com/personal/xy-n_mxxxx_org/Documents
vendor = sharepoint
user = xy-n@mxxxx.org
pass = xxxxxxxx

 

 

  1. 注意哈 不能直接复制配置文件 pass必须是加密后的 明文密码挂载会报错

最后修改日期: 2023年4月1日

作者

留言

撰写回覆或留言

发布留言必须填写的电子邮件地址不会公开。