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

2019-09-02 07:59:31 +08:00
 ReZer0

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

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

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

2160 次点击
所在节点    问与答
9 条回复
hyperbin
2019-09-02 08:30:42 +08:00
直接用 smaba 得了
ReZer0
2019-09-02 08:39:37 +08:00
@hyperbin 公网访问,内网用的 samba
crazykylin
2019-09-02 08:50:06 +08:00
你的问题没遇到过,资料不重要的话就直接映射出去好了,我有一些杂乱的资料直接公网 samba
ReZer0
2019-09-02 09:20:02 +08:00
@crazykylin 我再检查下看看,看是不是编译配置的时候漏了什么。
ReZer0
2019-09-02 09:32:29 +08:00
贴一下 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
2019-09-02 10:02:55 +08:00
编译模块:
./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
2019-09-02 10:52:32 +08:00
经测试 APACHE 可用,估计 nginx 哪里有问题。
weyou
2019-09-05 19:24:36 +08:00
nginx 配置里需要加上 lock/unlock method:
dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;
不过即使这样你仅仅能够新建文件,还是不能上传文件,上传需要支持 PROPPATCH method,现在 nginx+dav-ext 并不支持这个 method。
weyou
2019-09-05 19:27:47 +08:00
手机客户端可以上传文件是因为它并没有用到这些 method

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/597039

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX