ecryptfs-setup-private fails with ZFS

Bug #1574174 reported by Richard Laager on 2016-04-24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ecryptfs-utils (Ubuntu)

Bug Description

The obvious approach for using ZFS and ecryptfs together involves creating a dataset like this:
zfs create -o mountpoint=/home/.ecryptfs/USER rpool/home/USER

As a result, /proc/mounts looks like this:
rpool/home/USER /home/.ecryptfs/USER zfs rw,xattr 0 0

ecryptfs-setup-private checks for existing mount points:
grep -qs "$MOUNTPOINT " /proc/mounts && error "[$MOUNTPOINT]" "$(gettext 'is already mounted')"

This matches the list in /proc/mounts because of the device column ("rpool/home/USER").

Adding a space before $MOUNTPOINT in the grep (just like the space after it) solves this problem and shouldn't impact the intended purpose of the check.

Related branches

Richard Laager (rlaager) wrote :

I proposed the fix for upstream as a BZR branch:

Tyler Hicks (tyhicks) wrote :


Changed in ecryptfs:
status: New → Fix Committed
Richard Laager (rlaager) wrote :

Any chance of an ecryptfs update in time for Yakkety?

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ecryptfs-utils (Ubuntu):
status: New → Confirmed
Richard Laager (rlaager) wrote :

Any chance of seeing this merged for Bionic?

Seth Arnold (seth-arnold) wrote :

Probably not, we're winding down ecryptfs support. The installer for 18.04 won't suggest it, and we're recommending to users to migrate to either full disk encryption or ext4 native encryption. Pity zfs native encryption isn't ready for us to ship yet, there's no good solutions here.


Richard Laager (rlaager) wrote :

You can close this as "Won't Fix" then.

I have removed eCryptfs from the Ubuntu root-on-ZFS HOWTO for 18.04.

Once 18.04 is released, the old HOWTOs will be dropped, as 18.04 will then be the most recent release and the most recent LTS release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers