Добрый день!
Никак не могу настроить доступ к webdav-серверу с помощью rclone. Без авторизации все коннектится и работает. Почему-то не получается настроить авторизацию. Сервер webdav работает в докере:
version: '3'
services:
webdav:
image: bytemark/webdav
restart: always
ports:
- "80:80"
environment:
LOCATION: /
AUTH_TYPE: Digest
USERNAME: user
PASSWORD: password
ANONYMOUS_METHODS: GET,OPTIONS,PROPFIND
volumes:
- /home/silart/.local/webdav:/var/lib/dav
Задал переменную ANONYMOUS_METHODS чтобы неавторизованные пользователи могли только читать файлы.
Клиент rclone имеет следующий конфиг:
[mediabox]
type = webdav
url = http://aaa.bbb.ccc.ddd:port/
vendor = other
user = user
pass = Wum6D9kdpLAo6mjSe1BA7weTQkAetf8
Конфиг генерируется автоматически вызовом rclone config. Пароль вбиваю правильный. rclone запутывает пароль, переводя его с строку своего формата.
Запускаю клиент так:
rclone mount mediabox: /home/silart/mediabox
Лог:
rclone -vv mount mediabox: /home/silart/mediabox
2024/01/29 16:07:19 DEBUG : rclone: Version "v1.65.2" starting with parameters ["rclone" "-vv" "mount" "mediabox:" "/home/silart/mediabox"]
2024/01/29 16:07:19 DEBUG : Creating backend with remote "mediabox:"
2024/01/29 16:07:19 DEBUG : Using config file from "/home/silart/.config/rclone/rclone.conf"
2024/01/29 16:07:19 DEBUG : found headers:
2024/01/29 16:07:19 INFO : webdav root '': poll-interval is not supported by this remote
2024/01/29 16:07:19 NOTICE: webdav root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
2024/01/29 16:07:19 DEBUG : webdav root '': Mounting on "/home/silart/mediabox"
2024/01/29 16:07:19 DEBUG : : Root:
2024/01/29 16:07:19 DEBUG : : >Root: node=/, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Lookup: name=".Trash"
2024/01/29 16:07:19 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: Lookup: name=".xdg-volume-info"
2024/01/29 16:07:19 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2024/01/29 16:07:19 DEBUG : /: Lookup: name="autorun.inf"
2024/01/29 16:07:19 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Lookup: name=".Trash-1000"
2024/01/29 16:07:19 DEBUG : /: >Lookup: node=.Trash-1000/, err=<nil>
2024/01/29 16:07:19 DEBUG : .Trash-1000/: Attr:
2024/01/29 16:07:19 DEBUG : .Trash-1000/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : .Trash-1000/: Lookup: name="files"
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : .Trash-1000/: >Lookup: node=.Trash-1000/files/, err=<nil>
2024/01/29 16:07:19 DEBUG : .Trash-1000/files/: Attr:
2024/01/29 16:07:19 DEBUG : .Trash-1000/files/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : .Trash-1000/files/: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : /: ReadDirAll:
2024/01/29 16:07:19 DEBUG : /: >ReadDirAll: item=10, err=<nil>
2024/01/29 16:07:19 DEBUG : /: Lookup: name="autorun.inf"
2024/01/29 16:07:19 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2024/01/29 16:07:19 DEBUG : /: Attr:
2024/01/29 16:07:19 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2024/01/29 16:07:19 DEBUG : .Trash-1000/files/: >ReadDirAll: item=2, err=<nil>
^C2024/01/29 16:07:22 INFO : Signal received: interrupt
2024/01/29 16:07:22 ERROR : /home/silart/mediabox: Unmounted rclone mount
2024/01/29 16:07:22 INFO : Exiting...
При попытке что-то скопировать, получаю:
2024/01/29 16:08:19 ERROR : data/links.xodp: Failed to copy: 401 Unauthorized
2024/01/29 16:08:19 ERROR : data/links.xodp: WriteFileHandle.New Rcat failed: 401 Unauthorized
2024/01/29 16:08:19 DEBUG : data/links.xodp: Remove:
2024/01/29 16:08:19 DEBUG : data: Added virtual directory entry vDel: "links.xodp"
2024/01/29 16:08:19 DEBUG : data/links.xodp: >Remove: err=<nil>
2024/01/29 16:08:19 ERROR : data/links.xodp: WriteFileHandle.Flush error: 401 Unauthorized
2024/01/29 16:08:19 ERROR : IO error: 401 Unauthorized
Проблема: IO error: 401 Unauthorized
У кого-нибудь есть опыт настройки rclone?