webdav shares

stern88
Posts: 134
Joined: Thu Oct 13, 2011 8:03 am

webdav shares

Postby stern88 » Fri Jan 13, 2012 3:06 am

Hi!

Its IMHO a good idea to (automatically = zero conf) share all SMB-Folders also as webDAV. Here are some advantages of webDAV
Locking (concurrency control): long-duration exclusive and shared write locks prevent the overwrite problem, where two or more collaborators write to the same resource without first merging changes. To achieve robust Internet-scale collaboration, where network connections may be disconnected arbitrarily, and for scalability, since each open connection consumes server resources, the duration of DAV locks is independent of any individual network connection.
Properties: XML properties provide storage for arbitrary metadata, such as a list of authors on Web resources. These properties can be efficiently set, deleted, and retrieved using the DAV protocol. DASL, the DAV Searching and Locating protocol, provides searches based on property values to locate Web resources.
Namespace manipulation: Since resources may need to be copied or moved as a Web site evolves, DAV supports copy and move operations. Collections, similar to file system directories, may be created and listed.
More informations here: http://www.webdav.org

My example of 2 shares:

Code: Select all

#<VirtualHost *:443> <IfModule mod_dav.c> # Its not necessary to load this modules, as they should be already loaded # LoadModule dav_module mod_dav.so # LoadModule dav_fs_module mod_dav_fs.so # LoadModule ssl_module mod_ssl.so DavLockDB /var/hda/webdav/locks/DAVLocks LimitXMLRequestBody 131072 # Not necessary, as long as Port 443 is free to use. # NameVirtualHost *:443 # My first share "downloads" Alias /downloads "/var/hda/files/downloads" <Directory /var/hda/files/downloads> SSLRequireSSL Dav On #erzwingt, dass alles "normal" abgespeichert wird, auch Skripte # ForceType text/plain Options +Indexes IndexOptions FancyIndexing AddDefaultCharset UTF-8 AuthType Basic AuthName "WebDAV Server" AuthUserFile /var/hda/webdav/users/passwd.users Require valid-user Order allow,deny Allow from all # Keine .htaccess-Dateien erlauben AllowOverride None </Directory> # My second share "music" Alias /music "/var/hda/files/music" <Directory /var/hda/files/music> SSLRequireSSL Dav On #erzwingt, dass alles "normal" abgespeichert wird, auch Skripte ForceType text/plain Options +Indexes IndexOptions FancyIndexing AddDefaultCharset UTF-8 AuthType Basic AuthName "WebDAV Server" AuthUserFile /var/hda/webdav/users/passwd.users Require valid-user Order allow,deny Allow from all AllowOverride None </Directory> # I encountered some problems with my own certificates. It seems like, there are already some certificates. #SSLEngine on #SSLCertificateFile /etc/httpd/ssl/httpd.pem #SSLCertificateKeyFile /etc/httpd/ssl/httpd.key </IfModule> #</VirtualHost>
"/etc/httpd/conf.d/webdav.conf"

It seems like there are already certificates:

Code: Select all

[root@hda httpd]# cadaver https://hda.home.lan/downloads WARNING: Untrusted server certificate presented for `hda.home.lan': Issued to: SomeOrganizationalUnit, SomeOrganization, SomeCity, SomeState, -- Issued by: SomeOrganizationalUnit, SomeOrganization, SomeCity, SomeState, -- Certificate is valid from Wed, 21 Dec 2011 22:21:40 GMT to Thu, 20 Dec 2012 22:21:40 GMT Do you wish to accept the certificate? (y/n) y Authentication required for WebDAV Server on server `hda.home.lan': Username: administrator Password: dav:/downloads/> ls Listing collection `/downloads/': succeeded. Coll: .BitTornado 0 Okt 21 18:13 Coll: .Trash-1000 0 Nov 15 20:07 Coll: .Trash-500 0 Dez 23 11:28 Coll: .config 0 Okt 22 02:18 Coll: .fluxd 0 Nov 14 21:04 Coll: .pki 0 Okt 22 02:18 Coll: .rsscache 0 Nov 4 10:37 Coll: .transfers 0 Jan 12 22:19 ...
unsolved problems:
the user has to create (manually) accounts and passwords. How can I use an existing database? And where is this databse?

stern88
Posts: 134
Joined: Thu Oct 13, 2011 8:03 am

Re: webdav shares

Postby stern88 » Fri Jan 13, 2012 3:37 am

Btw: I recommend using davfs2 to connect with the shares:

Code: Select all

sudo apt-get install davfs2 sudo mount -t davfs https://yourusername.yourhda.com/yourshare /yourmountpoint
or

/etc/fstab

Code: Select all

https://yourusername.yourhda.com /yourmountpoint davfs user,noauto 0 0

User avatar
bigfoot65
Project Manager
Posts: 11300
Joined: Mon May 25, 2009 4:31 pm

Re: webdav shares

Postby bigfoot65 » Fri Jan 13, 2012 2:51 pm

So I take it you are testing this? Is it something that could be documented in the wiki? I wonder how it will react with Greyhole.
ßîgƒσστ65
Applications Manager

stern88
Posts: 134
Joined: Thu Oct 13, 2011 8:03 am

Re: webdav shares

Postby stern88 » Sat Jan 14, 2012 2:30 pm

So I take it you are testing this? Is it something that could be documented in the wiki?
Sure I can test. I use webDAV regulary and it works very good. So I think it could be implemented per default. But even if webDAV shares are enabled per default (by Amahi) its necessary to open ports. This point should be mentioned in the wiki. At next it should be discussed to enabled or disable this option:

Code: Select all

ForceType text/plain
If enabled all files (mp3s, videos,...) will be shown as text-files. But webDAV will try to execute skripts. If disabled your files will have its original header, but webDAV will execute (php-/html-) scripts.
I wonder how it will react with Greyhole.
Greyhole? what is Greyhole?

User avatar
bigfoot65
Project Manager
Posts: 11300
Joined: Mon May 25, 2009 4:31 pm

Re: webdav shares

Postby bigfoot65 » Sat Jan 14, 2012 2:37 pm

Greyhole is the storage pooling solution used by Amahi.

http://wiki.amahi.org/index.php/Greyhole
ßîgƒσστ65
Applications Manager

thisispoki
Posts: 10
Joined: Mon Feb 14, 2011 5:44 am

Re: webdav shares

Postby thisispoki » Mon Jan 30, 2012 9:51 am

Would there be legs in configuring ownCloud into a one-click application to provide this functionality?
http://owncloud.org/

User avatar
bigfoot65
Project Manager
Posts: 11300
Joined: Mon May 25, 2009 4:31 pm

Re: webdav shares

Postby bigfoot65 » Mon Jan 30, 2012 12:19 pm

It has been packaged.

http://www.amahi.org/apps/owncloud

It is still being worked.

[ Post made via Android ] Image
ßîgƒσστ65
Applications Manager

stern88
Posts: 134
Joined: Thu Oct 13, 2011 8:03 am

Re: webdav shares

Postby stern88 » Sat Aug 04, 2012 12:37 pm

So I take it you are testing this? Is it something that could be documented in the wiki? I wonder how it will react with Greyhole.
I test it for some time past and it works fine. There are no problems.

It must be documented in the wiki, as the user has to forward port 443 in case he wants to use the secure webdavs. And there are some small problems mounting webdavs-shares with self-signed certificates.

Who is online

Users browsing this forum: No registered users and 2 guests