分享

Linux挂载webdav

 HD-内外兼修 2022-09-30 发布于广东

有docker建议直接使用docker:docker run -itd      --name mydav     --device /dev/fuse     --cap-add SYS_ADMIN     --security-opt "apparmor=unconfined"     --env "WEBDRIVE_USERNAME=用户名"     --env "WEBDRIVE_PASSWORD=密码"     --env "WEBDRIVE_URL=http://172.17.0.5:48080/remote.php/dav/files/eric/"     --env "DAVFS2_ASK_AUTH=0"     -v /mnt/dav:/mnt/webdrive:rshared     efrecon/webdav-client

安装所需软件包:apt-get install davfs2 -y

创建挂载目录:mkdir /mnt/dav

挂载:mount -t davfs -o noexec https://nextcloud./remote.php/webdav/ /mnt/dav/

卸载:umount /mnt/dav

保存账号密码:cat << EOF | sudo tee -a /etc/davfs2/secrets # personal webdav, nextcloud application password /mnt/dav milosz mypassword # older versions used URL, it is equivalent for compatibility reasons #https://nextcloud./remote.php/webdav/ milosz mypassword EOF

开机自动挂载:cat << EOF | sudo tee -a /etc/fstab # personal webdav https://nextcloud./remote.php/webdav/ /mnt/dav davfs _netdev,noauto,user,uid=milosz,gid=milosz 0 0 EOF

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多