Re: [OT] how to share a directory under ntfs mount point with selinux enabled?

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

 



On 1/20/2012 5:45 PM, Gianluca Cecchi wrote:
On Fri, Jan 20, 2012 at 11:23 PM, Gianluca Cecchi
<gianluca.cecchi@xxxxxxxxx>  wrote:


Unfortunately putting the line
/dev/sda1                                       /w7                  ntfs-3g
context=system_u:object_r:samba_share_t       1 0

I get this when trying to mount:
ntfs-3g-mount: mount failed: Invalid argument

And in messages:
kernel: [14596.016616] SELinux:
security_context_to_sid(system_u:object_r:samba_share_t) failed for
(dev sda1, type fuseblk) errno=-22

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

ALso, creating a test.txt file from the windows network attached
machine, the context properties are correctly managed from a linux
point of view:

$ getfattr -n security.selinux /w7/test_share/test.txt
getfattr: Removing leading '/' from absolute path names
# file: w7/test_share/test.txt
security.selinux="system_u:object_r:samba_share_t:s0"


Thanks,
Gianluca


Its good to hear that those options are getting passed into the kernel now. Sorry about forgetting the s0 I copied and pasted the context from another post (and changed the type). I'm glad things worked out for you.

Dave
--
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