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

 
 

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

Submitter:  None
Submitted:  Thu 12 Apr 2012 07:30:54 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  _71007
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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).

- <_71007>
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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by _71007 (Posted a comment)
  • -email is unavailable- added by nageniil
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-04-20 _71007 StatusIn Progress Done
        Open/ClosedOpen Closed
    2012-04-14 _71007 StatusNone In Progress
        Assigned toNone _71007
    2012-04-12 nageniil Carbon-Copy- Added nageniil

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code