davfs kernoops can't mount partition as user

Bug #459998 reported by abdanner on 2009-10-24
60
This bug affects 9 people
Affects Status Importance Assigned to Milestone
davfs2 (Debian)
Fix Released
Unknown
davfs2 (Ubuntu)
Undecided
Unassigned
Lucid
Undecided
Unassigned
Maverick
Undecided
Unassigned
kerneloops (Ubuntu)
Undecided
Unassigned
Lucid
Undecided
Unassigned
Maverick
Undecided
Unassigned

Bug Description

Binary package hint: davfs2

Just upgraded to 9.10 karmic today. When I try to mount a webDAV partition as a non-root user, I get

/sbin/mount.davfs: / is the home directory of user kernoops.
You can't mount into another users home directory

This worked in 9.04 jaunty

my fstab for the partition is

https://hostname_here.edu /media/dav davfs rw,noauto,user 0 0

mount /media/dav produces this error

my davfs2.conf contains

dav_group davfs2
use_locks 0

man mount.davfs2 reads:

 When mounted by an ordinary user, the mount point must not lie
              within the home directory of another user.

but kernoops seems like a strange user with a home directory of root. Can this directory be changed or can mount.davfs be fixed?

yes, this is a problem. until there is a legitimate fix I'm going to do without the oops tracker:

apt-get remove kerneloops-daemon
perl -ni -e 'print unless /kernoops/' /etc/passwd

I could maybe see this being a bug of kerneloops-daemon since / is not really a home directory in the traditional sense, but on the other hand davfs2 policy is not ideal since there are many unusual but technically possible assignments of home directories. I would rather see davfs2 restrict mounting in a better way, maybe only on directories that the user has write permission on regardless of where it is in the filesystem.

From davfs2.conf manpage:
       ignore_home
              An ordinary user is not allowed to mount within the home direc‐
              tory of another user. But sometimes system users (like nobody)
              get assigned home directories (like /), that include common
              mount points. This option allows to give a comma seperated list
              of system users that will be excluded from this check.
              Only allowed in the system wide configuration file.

So, the following line to /etc/davfs2/davfs2.conf should solve the problem without disabling the oops tracker:

ignore_home kernoops

abdanner (abdanner) wrote :

Thanks Fran. I missed the ignore_home options in man davfs2.conf. It works fine.

Changed in davfs2 (Ubuntu):
status: New → Invalid
Bastelnerk (bastelnerk) wrote :

+1 for changing default settings. otherwise everyone using davfs for the first time has to google until this bug is found.

Fabian Schäfer (fabians) wrote :

Happened to me as well on 10.04.

Choik (choikzcomputers) wrote :

I'm trying his solution but every time I exclude a user, it looks like the system magically finds another user whose home dir it is.
So far I excluded "nobody" "dbus" "tcpdump" "heldaemon" and "nm-openconnect".

Every time I add one to the list, another one seems to block my path.

I'm using Fedora 14

Choik (choikzcomputers) wrote :

Anyone still active in this one?

Choik (choikzcomputers) wrote :

This seems to be working on Ubuntu 10.10 but not on Fedora 14.
Also, I am getting mapped to my folder /oneNet/Netstorage but I only see a Lost&Found folder.
Nothing else :(

Any idea why this coud be?

If I go in via command prompt I see all my network folders but of course I'd like to use a GUI

Choik (choikzcomputers) wrote :

Well this is an eye opener.
Just apt-get install konquerer and he can webdav://yourplace.com/yourfolder immideately!!

Changed in davfs2 (Ubuntu):
status: Invalid → Confirmed
Michael R. Crusoe (misterc) wrote :

Looks like this is an Ubuntu-only issue, but it'd be nice to have fixed here.

Unlike the Fedora user above adding kernaloops to the ignore_home option fixed the issue for me. As kerneloops is part of the default install for ubuntu-desktop and ubuntu-netbook I agree that this should fix should be part of the Ubuntu package.

Changed in davfs2 (Ubuntu):
status: Confirmed → In Progress
Michael R. Crusoe (misterc) wrote :

I have confirmed that this (particular) bug is unique to Ubuntu and Ubuntu derivatives, as Debian's kerneloops packages does not make use of a special account.

Hence my proposed merge to fix this in Ubuntu's branch (and not upstream).

tags: added: patch verification-done
Martin Pitt (pitti) on 2011-03-30
tags: removed: verification-done
Martin Pitt (pitti) on 2011-03-30
Changed in kerneloops (Ubuntu):
status: New → Invalid
Changed in kerneloops (Ubuntu Lucid):
status: New → Invalid
Changed in kerneloops (Ubuntu Maverick):
status: New → Invalid
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package davfs2 - 1.4.6-1ubuntu1

---------------
davfs2 (1.4.6-1ubuntu1) natty; urgency=low

  * Add kernoops to ignore_home to allow mounts under / in Ubuntu.
    (LP: #459998)
  * Add distccd to ignore_home to allow mount under / in Debian & Ubuntu.
 -- <email address hidden> (Michael R. Crusoe) Wed, 30 Mar 2011 14:42:35 +0200

Changed in davfs2 (Ubuntu):
status: In Progress → Fix Released
Martin Pitt (pitti) wrote :

Maverick merged/uploaded.

Changed in davfs2 (Ubuntu Maverick):
status: New → Fix Committed
Martin Pitt (pitti) wrote :

Applied patch to lucid and uploaded to unapproved queue, needs ubuntu-sru processing now.

Changed in davfs2 (Ubuntu Lucid):
status: New → Fix Committed
Clint Byrum (clint-fewbar) wrote :

APPROVED: after review the package should enter lucid-proposed.

  Non blocker problems:
   - config.sub debian/po are unrelated changes, but all in auto-generated files and so acceptible though the package should be fixed to not modify these files in the clean target.

Accepted davfs2 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Changed in davfs2 (Debian):
importance: Undecided → Unknown
status: New → Unknown
Martin Pitt (pitti) wrote :

Accepted davfs2 into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Michael R. Crusoe (misterc) wrote :

Turns out that the system-wide configuration is copied to ~/.davfs2/ if it isn't present after a user mount. Unfortunately it errors on any "system wide config file only" option present in this location, including the one I introduced.

So the version in Natty (and maverick-proposed & lucid-proposed) now represents a regression.

I'm looking to see if it would be easy to develop a patch to silently ignore these system wide configuration options while reading the ~/.davfs2/davfs2.conf file.

If timing is tight, then the version in natty should be reverted. Mea culpa!

Martin Pitt (pitti) wrote :

Thanks for noticing. I removed the packages from lucid/maverick-proposed again. I also uploaded a reversion to natty.

Odd that this happens, though; the option is marked as "system-wide config only"? I. e. it's a bug that these options are being copied to the per-user one?

tags: removed: patch verification-needed
Changed in davfs2 (Ubuntu Lucid):
status: Fix Committed → Triaged
Changed in davfs2 (Ubuntu Maverick):
status: Fix Committed → Triaged
Changed in davfs2 (Ubuntu):
status: Fix Released → Triaged
Michael R. Crusoe (misterc) wrote :

I've filled LP: 746700 explaining this discovery and have linked it to a fix

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package davfs2 - 1.4.6-1ubuntu3

---------------
davfs2 (1.4.6-1ubuntu3) natty; urgency=low

  * Warn on misplaced configuration options, don't exit (LP: #746700)
  * Add kernoops to ignore_home to allow mounts under / in Ubuntu.
    (LP: #459998)
  * Add distccd to ignore_home to allow mount under / in Debian & Ubuntu.
 -- <email address hidden> (Michael R. Crusoe) Fri, 01 Apr 2011 12:20:43 +0200

Changed in davfs2 (Ubuntu):
status: Triaged → Fix Released
Michael R. Crusoe (misterc) wrote :

Upstream has released a different fix for this and LP: #746700 at https://savannah.nongnu.org/support/?107641. This still needs packaging.

Yury V. Zaytsev (zyv) wrote :

So how about Maverick?

Changed in davfs2 (Debian):
status: Unknown → New
Changed in davfs2 (Debian):
status: New → Fix Released
Rolf Leggewie (r0lf) wrote :

please backport a fix to lucid

Rolf Leggewie (r0lf) wrote :

maverick has seen the end of its life and is no longer receiving any updates. Marking the maverick task for this ticket as "Won't Fix".

Changed in davfs2 (Ubuntu Maverick):
status: Triaged → Won't Fix
Changed in davfs2 (Ubuntu Lucid):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.