<br><br><div class="gmail_quote">On Wed, Jan 12, 2011 at 7:07 PM, Daniel J Walsh <span dir="ltr">&lt;<a href="mailto:dwalsh@redhat.com">dwalsh@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
</div><div><div></div><div class="h5">On 01/12/2011 04:03 PM, Paul Howarth wrote:<br>
&gt; On Wed, 12 Jan 2011 13:02:21 -0500<br>
&gt; Daniel J Walsh &lt;<a href="mailto:dwalsh@redhat.com">dwalsh@redhat.com</a>&gt; wrote:<br>
&gt;&gt; On 01/12/2011 06:29 AM, Paulo Cavalcanti wrote:<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I have two HDs on my computer: one with rhel5 5.5 and the other with<br>
&gt;&gt;&gt; fedora 14.<br>
&gt;&gt;&gt; Both systems share some directories located in a common /home,<br>
&gt;&gt;&gt; mainly used by the httpd process.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The problem is that selinux in fedora 14 uses &quot;unrestricted_u&quot; by<br>
&gt;&gt;&gt; default for all users, which rel5 does not understand,<br>
&gt;&gt;&gt; and any file labeled that way is treated as &quot;unlabeled_t&quot; in rhel5.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I tried to relabel all files in Fedora 14 using &quot;chcon -R -u user_u<br>
&gt;&gt;&gt; -t user_home_t&quot; , for instance,<br>
&gt;&gt;&gt; but every new file is still created as &quot;unrestricted_u&quot;.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I know very little about selinux, and I would like to know how to<br>
&gt;&gt;&gt; force all files in F14 to be user_u,<br>
&gt;&gt;&gt; but keeping the user owning those files, unrestricted.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Is that possible? Is there a better solution for not having tons of<br>
&gt;&gt;&gt; denials in rhel5?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Paulo Roma Cavalcanti<br>
&gt;&gt;&gt; LCG - UFRJ<br>
&gt;&gt;&gt;<br>
&gt;&gt; One solution would be to mount with a context on one of the platforms.<br>
&gt;&gt;<br>
&gt;&gt; On RHEL5 mount the users homedir with a context of nfs_t, and set the<br>
&gt;&gt; boolean to say allow nfs homedirs<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; mount -o context=&quot;system_u:object_r:nfs_t:s0&quot; /dev/ABC /home<br>
&gt;&gt; setsebool -P use_nfs_home_dirs 1<br>
&gt;<br>
&gt; What happens with newly-created files whilst booted in RHEL-5 in this<br>
&gt; case? What will Fedora 14 see them as?<br>
&gt;<br>
&gt; Paul.<br>
<br>
</div></div>nfs_t, i think so Stephens solution is probably better?  I would hope in<br>
stephens solution they would be labeled user_home_t.  But it would<br>
probably be smart to run restorecon -R -v ~/ When you login on F14<br>
<div class="im">-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.11 (GNU/Linux)<br>
Comment: Using GnuPG with Fedora - <a href="http://enigmail.mozdev.org/" target="_blank">http://enigmail.mozdev.org/</a><br>
<br>
</div><br></blockquote><div><br>I would like to thank you all for the suggestions.<br><br>In rhel5, I changed my fstab this way:<br><br>LABEL=/home             /home                   ext4    defaults,context=user_u:object_r:user_home_t:s0        1 2 <br>
<br><br>All the files labelled &quot;unconfined_u:object_r:user_home_t:s0&quot; in F14 are seen<br>as &quot;user_u:object_r:user_home_t:s0&quot; in rhel5, and my /var/log/mesages is not no longer<br>full of denials. <br><br>
However, even allowing httpd to read user content on rhel5 (files labelled user_home_t, I guess),<br>I still get some warnings from selinux troubleshooter. Does this flag really work on rhel5?<br><br>Does anyone think that using nfs_t (and setsebool -P use_nfs_home_dirs 1) would make any difference?<br>
Also, does anyone know whether rhel6 will be more &quot;Fedora like&quot;, from an selinux point of view?<br><br>Cheers.<br><br></div></div>-- <br>Paulo Roma Cavalcanti<br>LCG - UFRJ<br>