WebDAV
Ziel
Ziel ist es, ein Verzeichnis per WebDAV durch den user-Apachen für einen Windows-PC einzurichten.
Firmware-Stand DSM 2.3-1157. Getestet mit einem Vista-PC.
Anleitung
1) Erzeugen eines Verzeichnisses, hier im Beispiel /volume1/dav, am besten alle Rechte geben
2) Per Telnet oder AdminTool die Apache-user-Konfigurationsdatei (/usr/syno/apache/conf/httpd.conf-user) ändern:
# Distributed authoring and versioning (WebDAV) Include conf/extra/httpd-dav.conf
und zwar das Kommentarzeichen (#) in der 2. Zeile entfernen.
3) Installation des IPKG-Apachen - kopieren des Tools /opt/sbin/htdigest nach /usr/sbin/htdigest - deinstallieren des IPKG-Apachen
4) Anlegen einer Password-Datenbank namens user.passwd in das Verzeichnis /usr/syno/etc:
/opt/sbin/htdigest -c "/usr/syno/etc/user.passwd" DAV admin
Damit wird für die 'realm' DAV ein Benutzer namens 'admin' angelegt. Es wird 2x nach einem Kennwort gefragt, welches man hier definiert. Die Option -c wird beim ersten Anlegen benötigt oder später, wenn man alles überschreiben möchte.
5) Erstellen einer neuen Apache-Konfigurationsdatei namens httpd-dav.conf im Verzeichnis /usr/syno/apache/conf/extra:
# Distributed authoring and versioning (WebDAV) # # Required modules: mod_dav, mod_dav_fs, mod_setenvif, mod_alias # mod_auth_digest, mod_authn_file # LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule auth_digest_module modules/mod_auth_digest.so # # The following example gives DAV write access to a directory called # "uploads" under the ServerRoot directory. # # The User/Group specified in httpd.conf needs to have write permissions # on the directory where the DavLockDB is placed and on any directory where # "Dav On" is specified. # DavLockDB /volume1/@tmp/DavLock Alias /dav /volume1/@dav <Directory "/volume1/@dav"> Order Allow,Deny Allow from all Options Indexes FollowSymLinks MultiViews </Directory> <Location /dav> Dav On AuthType Digest AuthName DAV # AuthDigestDomain /dav/ https://syno/dav/ # AuthDigestProvider file # You can use the htdigest program to create the password database: # /opt/sbin/htdigest -c "/usr/syno/etc/user.passwd" DAV admin AuthUserFile "/usr/syno/etc/user.passwd" <LimitExcept OPTIONS> Require valid-user </LimitExcept> </Location> # # The following directives disable redirects on non-GET requests for # a directory that does not include the trailing slash. This fixes a # problem with several clients that do not appropriately handle # redirects for folders with DAV methods. # BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "MS FrontPage" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully BrowserMatch "^gnome-vfs/1.0" redirect-carefully BrowserMatch "^XML Spy" redirect-carefully BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
6) Restart des user-Apachen
/usr/syno/etc/rc.d/S97apache-user.sh restart