Red Hat Bugzilla – Bug 170069
cant mount usb keys/disks as user any more.
Last modified: 2015-01-04 17:22:29 EST
/dev/sdc1 /media/key vfat
pamconsole,exec,noauto,user,fscontext=system_u:object_r:removable_t 0 0
yet when I try to mount it as a user, it fails, and this appears in dmesg
SELinux: security_context_to_sid(system_u:object_r:removable_t) failed for (dev
sdc1, type vfat) errno=-22
mounting it as root works. Trying to chown the files on the device fails with -EPERM
Above was with a FAT formatted usb key, but it's also repeatable with an ext3
formatted usb hard disk.
Steven and James,
Any idea why this is happening? Is this MCS/MLS Related?
I'd say the fstab line needs to be updated to add s0 to the end of the context.
So the problem is either libsetrans is removing the :s0 file and the kernel does
not understand. Or we have removable_t hard coded some where. The
default_context file and media files have the :s0.
Dave edit /etc/mcs.conf and disable translations. Uncomment the translation
line and see if it works.
I just inserted my usb stick into a rawhide machine and I am seeing
/dev/sdb on /media/usbdisk type ext2
And it seems to be working.