← Back to team overview

ecryptfs team mailing list archive

[Bug 445301] Re: ecryptfs-setup-private creates .ecryptfs dir with wrong permissions when GID is different than UID

 

This bug was fixed in the package ecryptfs-utils - 81-0ubuntu2

---------------
ecryptfs-utils (81-0ubuntu2) karmic; urgency=low

  * src/utils/ecryptfs-setup-private: fix bug where setup-private
    incorrectly assumed that the home/private dir ownerships should
    be owned by USER:USER; instead, default to USER:GROUP, where
    GROUP is the USER's primary group by default, cherry-pick upstream
    r463, LP: #445301

 -- Dustin Kirkland <kirkland@xxxxxxxxxx>   Wed, 14 Oct 2009 14:20:42
-0500

** Changed in: ecryptfs-utils (Ubuntu)
       Status: In Progress => Fix Released

-- 
ecryptfs-setup-private creates .ecryptfs dir with wrong permissions when GID is different than UID
https://bugs.launchpad.net/bugs/445301
You received this bug notification because you are a member of eCryptfs,
which is subscribed to ecryptfs-utils in ubuntu.

Status in eCryptfs - Enterprise Cryptographic Filesystem: Fix Committed
Status in “adduser” package in Ubuntu: Invalid
Status in “ecryptfs-utils” package in Ubuntu: Fix Released

Bug description:
when adding a user with an encrypted home directory passing the group ID from the CLI, the utility fail to set the permissions to the .ecryptfs and .Private directory.

Here is an example:

adduser --uid 1030 --gid 115 --encrypt-home lmondesi
...
chown: invalid group: `lmondesi:lmondesi'
chown: invalid group: `lmondesi:lmondesi'
chown: invalid group: `lmondesi:lmondesi'
chown: invalid group: `lmondesi:lmondesi'
chown: invalid group: `lmondesi:lmondesi'

This causes the permissions for the /home/.ecryptfs/lmondesi/.{ecryptfs,Private} which obviously prevents it from being mounted

lmondesi@zod:/home/.ecryptfs/lmondesi$ ls -la
total 16
drwxr-xr-x 4 root root 4096 2009-10-07 05:30 .
drwxr-xr-x 3 root root 4096 2009-10-07 05:30 ..
drwx------ 2 root root 4096 2009-10-07 05:30 .ecryptfs
drwx------ 2 root root 4096 2009-10-07 05:30 .Private