rclone: rclone mount with sharepoint(webdav), Got 403 FORBIDDEN whenever it running time close to 24 hours

Please refer to rclone forum: 403 FORBIDDEN WebDev problem

This is my webdav sharepoint config and command: my rclone config for webdav sharepoint [od1] type = webdav url = https://xxx-my.sharepoint.com/personal/xxxx_edu/Documents vendor = sharepoint user = xxxx@xxxx.edu pass = xxxxxxx

Run rclone mount: rclone mount --dump headers --log-level DEBUG --allow-other od1: /mnt/od1 --syslog &

Error Message I can’t access /mnt/od1 whenever the “rclone mount” running time is close to 24 hours. ls /mnt/od1/ ls: reading directory ‘/mnt/od1/’: Input/output error

The debug error message for rclone mount is : rclone[5204]: /: >ReadDirAll: item=-1, err=couldn’t list files: 403 FORBIDDEN: 403 FORBIDDEN X-Msdavext_error: 917656; Access denied. Before opening files in this location, you must first browse to the website and select the option to login automatically

I need to kill rclone mount and rerun to make it normal.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

@hensur wrote

Sharepoint returns Session Cookies, they don’t have a expiry date. I think we can only guess that the session will probably expire after 24 hours.

Seems plausible!

Thanks for the hint @ncw 😃 I had a look at it, but I think it might be overkill, as you already said. I think it should be enough to just request new cookies after 12hrs and set them again in the http client.

Sounds fine to me.

I just created a simple cookieRenew struct in the odrvcookie package: https://github.com/hensur/rclone/tree/bugfix-2562

I’ll leave it running for some time to check if this solves the problem. 😃

Ace!

Sharepoint returns Session Cookies, they don’t have a expiry date. I think we can only guess that the session will probably expire after 24 hours.

Thanks for the hint @ncw 😃 I had a look at it, but I think it might be overkill, as you already said. I think it should be enough to just request new cookies after 12hrs and set them again in the http client.

I just created a simple cookieRenew struct in the odrvcookie package: https://github.com/hensur/rclone/tree/bugfix-2562

I’ll leave it running for some time to check if this solves the problem. 😃

@xiaolei0125 yes, I’ll look into it.