Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 268316 - =sys-fs/ecryptfs-utils-73: wrong file permissions and positions, files missing
Summary: =sys-fs/ecryptfs-utils-73: wrong file permissions and positions, files missing
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Kernel Miscellaneous
Depends on:
Reported: 2009-05-02 17:16 UTC by tuXXer
Modified: 2009-11-07 18:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description tuXXer 2009-05-02 17:16:41 UTC
First problem:

After installing ecryptfs-util I was trying to setup an encrypted folder for a "normal" user.

I used the command "ecryptfs-setup-private"

This doesn't work. I'm getting an error:
> ecryptfs-insert-wrapped-passphrase-into-keyring: Error attempting to add passphrase key to user session keyring; rc = [1]

After switching file permissions of the file /sbin/mount.ecryptfs_private from
-rwxr-xr-x 1 root root 9244 23. Dez 08:18 /sbin/mount.ecryptfs_private
-rwsr-xr-x 1 root root 9244 23. Dez 08:18 /sbin/mount.ecryptfs_private
it works without problems.

P.S.: The use flag "suid" changes the permissions of /sbin/mount.ecryptfs, but ecryptfs-mount-private and ecryptfs-setup-private using /sbin/mount.ecryptfs_private instead of /sbin/mount.ecryptfs

The second problem is that the symlinks of Access-Your-Private-Data.desktop and README.txt are broken.

When using "ecryptfs-setup-private" the symlinks are pointing to:
Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt

The file /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop does not exists. The file /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt would be installed in the wrong place (/usr/share/doc/ecryptfs-utils-73/ecryptfs-mount-private.txt). IMHO "/usr/share/ecryptfs-utils" is the right place for these two files, because changing the symlinks for each user on an upgrade isn't nice...

Reproducible: Always

Steps to Reproduce:
1. Login as "normal" user
2. execute "ecryptfs-setup-private"

Expected Results:  
1. Mount and setup of ecryptfs should work as normal user
2. The created symlinks in the user directory should not be broken...

* chmod u+s /sbin/mount.ecryptfs_private fixes the problem
* maybe the "suid" flag could change the file /sbin/mount.ecryptfs_private instead of /sbin/mount.ecryptfs (on a Debian system this isn't needed!)

File permissions Debian system:
-rwxr-xr-x 1 root root 16920 23. Dez 08:18 /sbin/mount.ecryptfs
-rwsr-xr-x 1 root root  9244 23. Dez 08:18 /sbin/mount.ecryptfs_private
lrwxrwxrwx 1 root root    22  5. Feb 00:05 /sbin/umount.ecryptfs_private -> mount.ecryptfs_private

File permissions Gentoo system:
-rws--x--x 1 root root 25656  2. Mai 17:20 sbin/mount.ecryptfs
-rwxr-xr-x 1 root root 14544  2. Mai 17:20 sbin/mount.ecryptfs_private
-rwxr-xr-x 1 root root 10304  2. Mai 17:20 sbin/umount.ecryptfs
lrwxrwxrwx 1 root root    22  2. Mai 17:20 sbin/umount.ecryptfs_private -> mount.ecryptfs_private

Files on Debian:
ls -la /usr/share/ecryptfs-utils/
-rw-r--r--   1 root root   170 23. Dez 08:18 ecryptfs-mount-private.desktop
-rw-r--r--   1 root root   182 23. Dez 08:18 ecryptfs-mount-private.txt
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-06 00:15:36 UTC
Can you reproduce this bug with sys-fs/ecryptfs-utils-79?
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-11-07 18:38:13 UTC
Please reopen this bug after providing needed information.