ReZer0
V2EX  ›  问与答

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

  •  
  •   ReZer0 · Sep 2, 2019 · 2923 views
    This topic created in 2621 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
    hyperbin
    Sep 2, 2019 via Android
    1
    直接用 smaba 得了
    ReZer0
    ReZer0
    OP
    Sep 2, 2019
    2
    @hyperbin 公网访问,内网用的 samba
    crazykylin
    crazykylin
    Sep 2, 2019 via Android
    3
    你的问题没遇到过,资料不重要的话就直接映射出去好了,我有一些杂乱的资料直接公网 samba
    ReZer0
    ReZer0
    OP
    Sep 2, 2019
    4
    @crazykylin 我再检查下看看,看是不是编译配置的时候漏了什么。
    ReZer0
    ReZer0
    OP
    Sep 2, 2019
    5
    贴一下 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
    ReZer0
    OP
    Sep 2, 2019
    6
    编译模块:
    ./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
    ReZer0
    OP
    Sep 2, 2019
    7
    经测试 APACHE 可用,估计 nginx 哪里有问题。
    weyou
    weyou
    Sep 5, 2019 via Android
    8
    nginx 配置里需要加上 lock/unlock method:
    dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;
    不过即使这样你仅仅能够新建文件,还是不能上传文件,上传需要支持 PROPPATCH method,现在 nginx+dav-ext 并不支持这个 method。
    weyou
    weyou
    Sep 5, 2019 via Android
    9
    手机客户端可以上传文件是因为它并没有用到这些 method
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1257 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 21:00 · PVG 05:00 · LAX 13:00 · JFK 16:00
    ♥ Do have faith in what you're doing.