zoukankan      html  css  js  c++  java
  • Linux挂载webdav

    Docker挂载webdav(推荐):

    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
    	
    

    传统挂载webdav

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

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

    挂载:mount -t davfs -o noexec https://nextcloud.example.com/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.example.com/remote.php/webdav/ milosz mypassword
    EOF
    

    开机自动挂载:

    cat << EOF | sudo tee -a /etc/fstab
    
    # personal webdav
    https://nextcloud.example.com/remote.php/webdav/ /mnt/dav davfs _netdev,noauto,user,uid=milosz,gid=milosz 0 0
    EOF
    
  • 相关阅读:
    正向代理和反向代理
    Unicode
    utf-8
    ISO 8895-1
    ProtocalBuffers学习记录
    C#基础知识
    MSBuild学习记录
    Linux学习笔记
    Jenkins学习记录
    CruiseControl.Net学习记录
  • 原文地址:https://www.cnblogs.com/steinven/p/15469893.html
Copyright © 2011-2022 走看看