ReZer0
V2EX  ›  问与答

Windows 访问 WebDav 提示“另一个程序已锁定程序的一部分,进程无法访问”导致无法写入和读取大文件。

  •  
  •   ReZer0 · Sep 2, 2019 · 2798 views
    This topic created in 2532 days ago, the information mentioned may be changed or developed.

    用 Nginx 搭建了一个 WebDav(已加载第三方 nginx-dav-ext-module ),在用 Windows 系统访问的时候,发现无法写入文件,读取视频也提示被锁定,但小文件音乐可以读取。(已经允许非 http 不安全登录)

    起初我怀疑是 Nginx 的问题,但是利用手机的 ES 管理器进去发现不但可以读取,也可以创建( Nginx 文件限制已设置)。所以感觉应该不是 Nginx 的问题。

    不知道有没有遇到过的大伙,帮我看下这是什么情况。

    9 replies    2019-09-05 19:27:47 +08:00
    hyperbin
        1
    hyperbin  
       Sep 2, 2019 via Android
    直接用 smaba 得了
    ReZer0
        2
    ReZer0  
    OP
       Sep 2, 2019
    @hyperbin 公网访问,内网用的 samba
    crazykylin
        3
    crazykylin  
       Sep 2, 2019 via Android
    你的问题没遇到过,资料不重要的话就直接映射出去好了,我有一些杂乱的资料直接公网 samba
    ReZer0
        4
    ReZer0  
    OP
       Sep 2, 2019
    @crazykylin 我再检查下看看,看是不是编译配置的时候漏了什么。
    ReZer0
        5
    ReZer0  
    OP
       Sep 2, 2019
    贴一下 nginx 的配置:
    server {
    listen 80;
    server_name localhost;

    #charset koi8-r;

    #access_log logs/host.access.log main;

    location / {
    root /home/test;
    charset utf-8;
    autoindex on;
    dav_methods PUT DELETE MKCOL COPY MOVE;
    dav_ext_methods PROPFIND OPTIONS;
    create_full_put_path on;
    dav_access user:rw group:r all:r;(这里试过 rw 都不行)
    auth_basic "Authorized Users Only";
    auth_basic_user_file /usr/local/nginx/.htpasswd;
    }
    }
    ReZer0
        6
    ReZer0  
    OP
       Sep 2, 2019
    编译模块:
    ./configure \
    --prefix=/usr/local/nginx \
    --with-http_ssl_module \
    --with-openssl=/root/openssl \
    --with-pcre=/root/pcre \
    --with-zlib=/root/zlib \
    --with-http_dav_module --add-module=/root/nginx-dav-ext-module \
    --with-http_realip_module
    ReZer0
        7
    ReZer0  
    OP
       Sep 2, 2019
    经测试 APACHE 可用,估计 nginx 哪里有问题。
    weyou
        8
    weyou  
       Sep 5, 2019 via Android
    nginx 配置里需要加上 lock/unlock method:
    dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;
    不过即使这样你仅仅能够新建文件,还是不能上传文件,上传需要支持 PROPPATCH method,现在 nginx+dav-ext 并不支持这个 method。
    weyou
        9
    weyou  
       Sep 5, 2019 via Android
    手机客户端可以上传文件是因为它并没有用到这些 method
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1118 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 480ms · UTC 17:53 · PVG 01:53 · LAX 10:53 · JFK 13:53
    ♥ Do have faith in what you're doing.