Bug 739842 - mounted encrypted disk is automatically owned by root
Summary: mounted encrypted disk is automatically owned by root
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: udisks
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Zeuthen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-20 08:03 UTC by Martin Stransky
Modified: 2013-03-06 04:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-20 14:52:47 UTC


Attachments (Terms of Use)

Description Martin Stransky 2011-09-20 08:03:45 UTC
Description of problem:

Unencrypted disks (FAT/ext4) are mounted to /media and owned by used. Encrypted disk is mounted and owned by root.

I have one flash disk with unencrypted FAT and encrypted EXT4 patrices. It's mounted as:

/dev/sdf2 on /media/data type vfat (rw,nosuid,nodev,relatime,uid=500,gid=500,fmask=0022,dmask=0077,codepage=cp437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks)

/dev/mapper/udisks-luks-uuid-40dc1435-577a-4289-8ae3-855d4b4f67f0-uid500 on /media/data1 type ext4 (rw,nosuid,nodev,relatime,seclabel,user_xattr,acl,barrier=1,data=ordered,uhelper=udisks)

[komat@localhost media]$ ll /media
drwx------.  2 komat komat 4096 Sep 20 09:51 data
drwxr-xr-x.  4 root  root  4096 Sep 20 09:53 data1

Version-Release number of selected component (if applicable):
udisks-1.0.3-3.fc15.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Plug in the flash with such patrices
2.
3.

Comment 1 David Zeuthen 2011-09-20 14:52:47 UTC
If I understand your bug report correctly, this is just how it's supposed to work since ext4 records owner/group and mode in the filesystem itself and FAT doesn't. This means that if a filesystem is mounted, for ext4 you will see whatever owner/mode that is on disk, and for FAT the kernel will use the uid/gid passed as mount options.

You can solve the reported problem simply by chown'ing the top-level directory on the ext4 filesystem.

Btw, this is why Palimpsest has a "Take ownership of filesystem" checkbox when using a filesystem with permissions, see e.g.

 http://people.freedesktop.org/~david/palimpsest-ext-take-ownership.png

Closing as NOTABUG.


Note You need to log in before you can comment on or make changes to this bug.