17 Jan 2014

Mounting a HiDrive in Ubuntu

Accessing a (free) Strato HiDrive as a regular filesystem in Ubuntu is possible, though not completely trivial to set up. Here is what I had to do to get it running:
  1. I chose the WebDAV protocol to access my HiDrive (another option would be sftp, but only if you have a paid account). For this, some packages needed to be installed:
    
    sudo apt-get install davfs2
    sudo apt-get install ca-certificates
    
  2. I wanted to mount and use the HiDrive as a normal Ubuntu user, not as root. For this, the davfs2 package needed some tuning. I performed the following command:
    
    sudo dpkg-reconfigure davfs2
    
    and I answered "Yes" when it asked "Should unprivileged users be allowed to mount WebDAV resources?".
  3. Also, I needed to add myself (my Ubuntu username being penguin) to the davfs2 group:
    
    sudo usermod -a -G davfs2 penguin
    
  4. I created the mountpoint and made sure it would be accessible for a regular Ubuntu user:
    
    sudo mkdir /hidrive
    sudo chmod 777 /hidrive
    
  5. To configure the mountpoint, I edited /etc/fstab:
    
    sudo vi /etc/fstab
    
    and added the following entry:
    
    https://webdav.hidrive.strato.com/  /hidrive  davfs  user,noauto  0  0
    
For most Ubuntu users, this would be enough and the HiDrive could be mounted by this command (notice the absence of "sudo"):

mount /hidrive
However, this gave me an error that said:
/sbin/mount.davfs: / is the home directory of user abc.
You can't mount into another users home directory
A web search showed that some people got a similar message, only for user "kernoops". This could then be solved by adding kernoops to the ignore_home entry in the file /etc/davfs2/davfs2.conf. "kernoops" seems to be present already in most Ubuntus, but this abc user was not. I think in my case there was some kind of user/group id conflict caused by the YP/NIS server where this abc user was defined. Anyway, adding also abc to that line solved my problem:

sudo vi /etc/davfs2/davfs2.conf
ignore_home       kernoops,distccd,abc

No comments:

Post a Comment