2013-12-20 69 views
2

我遇到了Ubuntu Server,Apache,Webdav的一個不尋常的問題,並且一直未能找到答案。Apache Webdav,當test.txt文件存在時無法創建「測試」文件夾

如果我創建一個名爲「test.txt」的文件夾/文件,然後創建一個文件夾/文件「test」,它表示文件已經存在。如果我刪除「test.txt」,那麼我可以創建一個文件夾/文件「測試」它的工作原理。我也可以從服務器上的命令行創建。可以是文本以外的其他名稱,例如jquery.ui.zip和./jquery.ui/

我測試過的是公共服務器上,我可以創建兩個,所以我認爲它不是一個webdav的限制,但也許我的配置或apache2 webdav模塊導致問題。

許可證似乎沒問題,因爲我可以創建/複製/刪除文件夾/文件。只是命名衝突的問題。由於涉及大量文件,將它們全部重命名根本不切實際。

任何幫助的歡迎,在正確的方向輕推將是一件好事,

<VirtualHost *:443> 

    ServerName [removed] 
    ServerAlias [removed] 

    ServerAdmin [removed] 
    DocumentRoot /home/projects/ 

    ErrorLog /home/projects/error.log 
    LogLevel warn 
    #Options Indexes None 

    # SSL Engine Switch: 
    # Enable/Disable SSL for this virtual host. 
    SSLEngine on 

    # A self-signed (snakeoil) certificate can be created by installing 
    # the ssl-cert package. See 
    # /usr/share/doc/apache2.2-common/README.Debian.gz for more info. 
    # If both key and certificate are stored in the same file, only the 
    # SSLCertificateFile directive is needed. 
    SSLCertificateFile [removed] 
    SSLCertificateKeyFile [removed] 

    Alias /projects /home/projects/ 

    <Directory /home/projects/> 
     Options Indexes MultiViews 

     SSLOptions +StdEnvVars 

     AllowOverride None 
     Order allow,deny 
     allow from all 
    </Directory> 

    <Location /projects> 
     DAV On 
     AuthType Digest 
     AuthName "webdav1digest" 
     AuthUserFile [removed] 
     Require valid-user 

     ForceType text/plain 

     SSLOptions +StdEnvVars 

     Order deny,allow 
     Deny from all 
     Allow from 192.168.1.0/24 
    </Location> 

    # fixes a problem with several clients - redirects for folders with DAV methods. 
    BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-careful 
    BrowserMatch "MS FrontPage" redirect-carefully 
    BrowserMatch "^WebDrive" redirect-carefully 
    BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully 
    BrowserMatch "^gnome-vfs/1.0" redirect-carefully 
    BrowserMatch "^gvfs/*" redirect-carefully 
    BrowserMatch "^XML Spy" redirect-carefully 
    BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully 
</VirtualHost> 
+0

我打算用debian 7.3 – user1367101

+0

重建同樣的問題。可以創建測試文件夾,然後創建test.txt文件。但不是其他方式,例如test.txt然後測試文件夾...文件存在。 – user1367101

回答

1

添加AllowOverride NoneOptions None似乎來解決這個問題。

<Location /projects> 
    DAV On 

    AllowOverride None 
    Options None 
    ForceType text/plain 

    AuthType Digest 
    AuthName "webdav1digest" 
    AuthUserFile [removed] 
    Require valid-user 

    #SSLOptions +StdEnvVars 

    Order deny,allow 
    Deny from all 
    Allow from 192.168.1.0/24 
</Location> 
相關問題