TShopping

 找回密碼
 註冊
搜索
查看: 1368|回復: 0

[CentOS] CentOS 7 架設 WebDAV注意事項

[複製鏈接]
發表於 2021-4-8 22:26:12 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
架設過程主要參照這篇文章:
How to Set up WebDAV with Apache on CentOS 7

由於我只是在區網下架設,所以不進行認證,因此conf檔改成以下形式:


  1. DavLockDB /var/www/html/DavLock
  2. <VirtualHost *:80>
  3.         ServerAdmin webmaster@localhost
  4.         DocumentRoot /var/www/html/webdav/
  5.     ErrorLog /var/log/httpd/error.log
  6.     CustomLog /var/log/httpd/access.log combined
  7.         Alias /webdav /var/www/html/webdav
  8.         <Directory /var/www/html/webdav>
  9.             DAV On
  10.             Order allow,deny
  11.             Allow from all
  12.             AuthType None
  13.             Require all granted
  14.             Satisfy Any
  15.         </Directory>
  16. </VirtualHost>
複製代碼

但這樣Client端會無法寫入檔案,此時在 /var/log/httpd/error.log 下會出現以下錯誤訊息:

[Sun Jan 13 20:32:34.870769 2019] [dav:error] [pid 22893] [client 192.168.2.26:63409] The locks could not be queried for verification against a possible "If:" header.  [500, #0]
[Sun Jan 13 20:32:34.870975 2019] [dav:error] [pid 22893] [client 192.168.2.26:63409] Could not open the lock database.  [500, #400]
[Sun Jan 13 20:32:34.871053 2019] [dav:error] [pid 22893] (13)Permission denied: [client 192.168.2.26:63409] Could not open property database.  [500, #1]

這是由於apache沒有寫入 /var/www/html/DavLock的權限,將DB的路徑改到其他有存取權限的地方,或是修改 /var/www/html/ 目錄的owner即可正常使用。

 

臉書網友討論
*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-4-19 04:09 , Processed in 0.075509 second(s), 23 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表