<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
I have F8 and every time to I try to access remotely or locally NTFS
filesystems that shared via Samba I get a warning (at the end of this
mesage) from SELinux troubleshooter and can't access the share.<br>
I have tried to mount the filesystem with different context's but none
of them seem to do anything. The shares worked with previous version of
Fedora (F7). I have tried to mount the NTFS volume doing the following
to change it context:<br>
* mount -t ntfs-3g /dev/sda1 /mnt/petteri-c -o
context=system_u:system_r:smbd_t<br>
* mount -t ntfs-3g /dev/sda1 /mnt/petteri-c -o
context=system_u:object_r:smbd_t<br>
* mount -t ntfs-3g /dev/sda1 /mnt/petteri-c -o
fscontext=system_u:object_r:samba_share_t<br>
and various other mount options such as defcontext= and changed the
context=, fscontext=, and defcontext= parameter values.<br>
But the context stays the same (ls --lcontext):<br>
drwxrwxrwx&nbsp; 1 <u>system_u:object_r:fusefs_t</u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root root 12288
2007-12-12 21:13 petteri-c<br>
<br>
So how I am going tho get SELinux to allow Samba to share mounted NTFS
filesystem? (Sorry about the newbie question :( and possibly bad
english).<br>
SELinux is enforcing/targetted and all the booleans that refer to smbd
are checked allow from SELinux Administration.<br>
<br>
<i>Summary<br>
&nbsp;&nbsp;&nbsp; SELinux is preventing samba (smbd) "read" to &lt;Unknown&gt;
(fusefs_t).<br>
<br>
Detailed Description<br>
&nbsp;&nbsp;&nbsp; SELinux denied samba access to &lt;Unknown&gt;. If you want to
share this<br>
&nbsp;&nbsp;&nbsp; directory with samba it has to have a file context label of
samba_share_t.<br>
&nbsp;&nbsp;&nbsp; If you did not intend to use &lt;Unknown&gt; as a samba repository
it could<br>
&nbsp;&nbsp;&nbsp; indicate either a bug or it could signal a intrusion attempt.<br>
<br>
Allowing Access<br>
&nbsp;&nbsp;&nbsp; You can alter the file context by executing chcon -R -t
samba_share_t<br>
&nbsp;&nbsp;&nbsp; &lt;Unknown&gt; You must also change the default file context files
on the system<br>
&nbsp;&nbsp;&nbsp; in order to preserve them even on a full relabel.&nbsp; "semanage
fcontext -a -t<br>
&nbsp;&nbsp;&nbsp; samba_share_t &lt;Unknown&gt;"<br>
<br>
&nbsp;&nbsp;&nbsp; The following command will allow this access:<br>
&nbsp;&nbsp;&nbsp; chcon -R -t samba_share_t &lt;Unknown&gt;<br>
<br>
Additional Information&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
<br>
Source Context&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; system_u:system_r:smbd_t<br>
Target Context&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; system_u:object_r:fusefs_t<br>
Target Objects&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; None [ dir ]<br>
Affected RPM Packages&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
Policy RPM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; selinux-policy-3.0.8-64.fc8<br>
Selinux Enabled&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; True<br>
Policy Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; targeted<br>
MLS Enabled&nbsp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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ke 14. marraskuuta 2007 15:57:05<br>
Last Seen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to 13. joulukuuta 2007 07:13:17<br>
Local ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2f2fd1b5-757e-4b37-a44f-eb76e86a81c2<br>
Line Numbers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
<br>
Raw Audit Messages&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
<br>
avc: denied { read } for comm=smbd dev=sda1 name=/ pid=21782<br>
scontext=system_u:system_r:smbd_t:s0 tclass=dir<br>
tcontext=system_u:object_r:fusefs_t:s0<br>
<br>
<br>
</i>
</body>
</html>