helpdavfs2 - Support: sr #108022, How to mount several webdav file...

 
 

sr #108022: How to mount several webdav file storages?

Submitted by:  None
Submitted on:  Thu 12 Apr 2012 07:30:54 PM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: Done
Privacy: PublicAssigned to: Werner Baumann <wbaumann>
Originator Email: -unavailable-Open/Closed: Closed
Operating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 14 Apr 2012 04:24:05 PM UTC, comment #1:

There is an error in the davfs2.conf man page (see https://savannah.nongnu.org/bugs/?35255)

A certificate file must only contain one single certificate, the certificate of the top-level CA of the certificate chain. This file is only needed, if this CA-cert is not in the systems certificate data base or if the Neon library can't access it. In most cases you should not need a certificate file for commercial webdav providers. They usually have certs from one of the big CAs.

If you need a certificate file for more than one server you must use different conifuration options for the different mounts as described in man davfs2.conf.

For example:
if you mount some server at /home/user/foo and another one at /home/user/bar add this to your davfs2.conf

[/home/user/foo]
servercert /home/user/.davfs2/certs/foo.pem

[/home/user/bar]
servercert /home/user/.davfs2/certs/bar.pem

foo.pem and bar.pem must contain the appropriate top-level CA-certs for each server. The file names don't matter.

Cheers
Werner

P.S.: Remarks on Internet HowTos
HowTos found in the internet tend to be outdated or plainly wrong. The one at http://www.synology-wiki.de/index.php/WebDAV-Speicher_mithilfe_von_davfs2_direkt_in_die_DS_einbinden is mostly ok but not without errors.

3. Den SRC Code kompilieren mit:
./configure --prefix=/opt --with-neon=/opt --with-ssl
There is not option '--with-ssl'. SSL is handled by neon. It should be
./configure --prefix=/opt --with-neon=/opt

1. In der Datei /opt/etc/davfs2/secrets wird der Login für den Webspeicher hinterlegt.
https://sd2dav.1und1.de Login_Name Passwort
This is deprecated. davfs2 consistently uses the mount point to distinguish different mounted file systems. Using the server name in secrets is supported for campatibility reasons only and support will some day be removed. Use
/volume1/1und1 Login_Name Passwort

Oje eine Fehlermeldung und jetzt?
/sbin/mount.davfs: das Server-Zertifikat passt nicht zum Namen des Servers
Aussteller: GlobalSign nv-sa, Domain Validation CA, BE
Inhaber: *.safesync.com, Domain Control Validated, US
Name: *.safesync.com
Fingerabdruck: 63:bc:70:08:b8:25:64:94:49:b6:5f:93:04:1d:29:68:ef:88:8f:68
This is misleading. It is not the the certificate of 1und1.
If you get error 'das Server-Zertifikat passt nicht zum Namen des Servers' there is at the moment no way to accept the certificate automatically. An new option will be provided in future releases. But fortunately you don't get this error with 1und1. Note: there are different kinds of certificate errors. You can't know which one without reading the text of the error message.

umount error:
/sbin/umount.davfs:
can't find mount.davfs-process with pid 4661;
trying to unmount anyway.
you propably have to remove /var/run/mount.davfs/volume1-1und1.pid manually
The system probably lacks a working 'ps' program. The umount helper umount.davfs watches the process list to see when mount.davfs has finished synchronisation and writing of the index file. This makes sure that umount only returns when the file system is umounted and in a consistent state. Without this it may happen that you shut down the system (and kill mount.davfs) before it could clean up.
Without a working 'ps' davfs2 can't guarantee this. Before shuting down the system you might look for any running mount.davfs processes. PID-files in /var/run/mount.davfs will only be removed when mount.davfs has finished.

Whether you really need servercert depends on whether neon has access to the certificates of well known top-level CAs. Thawte should be available on most systems but in case of a NAS device this may not be the case.

I do not recommend to remove the comment mark (#) in davfs2.conf and secrets. The comments are intended as a reminder of the syntax and the default values. It is better to not touch the comments but to append all your configuration options at the end of the file. Preferably in mount point specific divisions (see above).

Werner Baumann <wbaumann>
Project AdministratorIn charge of this item.
Thu 12 Apr 2012 07:30:54 PM UTC, original submission:

I am using davfs2 on a Synology NAS (Busybox-Linux) as described in http://www.synology-wiki.de/index.php/WebDAV-Speicher_mithilfe_von_davfs2_direkt_in_die_DS_einbinden

Mounting a single webdav server works fine:
First I put the appropriate certificate.pem for the german "Strato HiDrive" into davfs/certs and mounting succeeded without asking [y,N] - great!
Then I concatenated a second thawte-pem for "1und1" and mounted successfully. Thus I have one pem file and I can mount two webdav drives - wonderful!

Now the problem is with concatenating one more webdav drive offered by t-online (25 GByte free storage).
Collecting the three necassary .crt files (a primary verisign CA, another verisign.inc cert and a server-cert "webdav.mediencenter.t-online.de") and concatenating them in one single .pem file works! I can mount the t-online storage.

So I think I have the matching certificates for each of the desired webdav storages. But when I try to combine all the five certs in one single pem, it fails.

Is there a limitation in the number of certs I can concatenate in one single .pem file or is there another thing I should mention? Is the order of the certifications in the pem-file important?
Well, I could try and write a script that mounts two drives, then renames the pem files and mounts the third drive - but that isnt really the way I wanted to do it. Is there another way to solve this problem?

Many thanks for some helpful ideas...

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wbaumann (Posted a comment)
  • -unavailable- added by nageniil
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 20 Apr 2014 07:10:53 PM UTCwbaumannStatusIn Progress=>Done
      Open/ClosedOpen=>Closed
    Sat 14 Apr 2012 04:24:05 PM UTCwbaumannStatusNone=>In Progress
      Assigned toNone=>wbaumann
    Thu 12 Apr 2012 07:39:19 PM UTCnageniilCarbon-Copy-=>Added nageniil

    Back to the top


    Powered by Savane 3.1-cleanup