Re: SELinux ntfs-mount context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/11/2012 01:06 PM, chritallic wrote:
> Does nobody have a suggestion? I still cannot get the ntfs files to have a
> proper context.
> 
Open a bugzilla on this issue.  I think this might be a bug in either the
mount command or in the kernel.
> On 10.06.2012 15:27, chritallic wrote:
>> Hey there,
>> 
>> I have a problem with an ntfs partition and it’s selinux context.
>> 
>> First of all I use the ntfs partition to store all my data. This includes
>> openvpn secrets. But as the ntfs gets a system_u:object_r:fusefs_t:s0
>> context, selinux prevents openvpn from opening the certificate.
>> 
>>> type=AVC msg=audit(1339236971.22:90): avc:  denied  { read } for
>>> pid=1689 comm="openvpn" name="mycert.crt" dev="sda5" ino=1729
>>> scontext=system_u:system_r:openvpn_t:s0
>>> tcontext=system_u:object_r:fusefs_t:s0 tclass=file
>> 
>> Now, instead of allowing every single app to access fusefs_t, I’d rather 
>> like to give the files the right context. Changing the context, however, 
>> doesn’t seem to be possible on ntfs:
>> 
>>> $ chcon -t "default_t" /data chcon: failed to change context of `/data'
>>> to `system_u:object_r:default_t:s0': Operation not supported
>> 
>> I then tried to mount the partition using the context option. But that 
>> did work either:
>> 
>>> $ mount -o context="system_u:object_r:user_home_t:s0" /dev/sda5 /data 
>>> ntfs-3g-mount: mount failed: Invalid argument $ mount -o
>>> context="system_u:object_r:user_home_t:s0",default /dev/sda5 /data 
>>> ntfs-3g-mount: mount failed: Invalid argument
>> 
>> Oddly enough, another user reported this syntax to work in the thread 
>> “[OT] how to share a directory under ntfs mount point with selinux 
>> enabled?“:
>> 
>>> OK. Walking through other documents I found that the "correct" syntax 
>>> is with a ":s0" at the end of the option, and also add defaults at the 
>>> end, like:
>>> 
>>> context=system_u:object_r:samba_share_t:s0,defaults
>>> 
>>> This way I can correctly mount a share against a directory under the
>>> ntfs tree
>> 
>> Does anybody now how to mount the partition correctly? Or even better: is
>> there a possibility to set the context of ntfs files?
>> 
>> Thanks, chritallic
>> 
>> PS: I’m new to selinux, so my apologies if there is something really dumb
>> in here. ;-)
>> 
> 


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/WP9MACgkQrlYvE4MpobMHMwCgroMyYiA/R3XT0PvI9NHNs9Cy
3l4AnjL7tpctX/5unStaYTJGqeiqR+F4
=k83t
-----END PGP SIGNATURE-----
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux