<div class="gmail_quote">On 3 October 2010 21:49, Dominick Grift <span dir="ltr">&lt;<a href="mailto:domg472@gmail.com">domg472@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5">On Sun, Oct 03, 2010 at 09:17:58PM +0100, Aaron Gray wrote:<br>
&gt; On 3 October 2010 21:03, Dominick Grift &lt;<a href="mailto:domg472@gmail.com">domg472@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; On Sun, Oct 03, 2010 at 08:48:59PM +0100, Aaron Gray wrote:<br>
&gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I had a fresh F11 server install, but with out VSFTPD, then I installed<br>
&gt; &gt; &gt; VSFTPD, but it is blocked by SELinux.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I turn off enforcement and FTP runs fine.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Is there some script or proceedure I can run to allow VSFTPD on F11 or do<br>
&gt; &gt; I<br>
&gt; &gt; &gt; have to do a reinstall of Fedora ?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Many thanks in advance,<br>
&gt; &gt;<br>
&gt; &gt; Can you enclose the AVC denials that you are seeying. With those you should<br>
&gt; &gt; be able to fix any issues. AVC denials are (usually) logged to<br>
&gt; &gt; /var/log/audit/audit.log and can easily be listed with ausearch command.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; First initial syscall :-<br>
&gt;<br>
&gt; time-&gt;Sun Oct  3 21:12:24 2010<br>
&gt; type=SYSCALL msg=audit(1286136744.107:21351): arch=40000003 syscall=120<br>
&gt; success=no exit=-1 a0=28000011 a1=0 a2=6f4334 a3=6f4334 items=0 ppid=1<br>
&gt; pid=1903 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0<br>
&gt; tty=(none) ses=5 comm=&quot;vsftpd&quot; exe=&quot;/usr/sbin/vsftpd&quot;<br>
&gt; subj=unconfined_u:system_r:ftpd_t:s0 key=(null)<br>
&gt; type=AVC msg=audit(1286136744.107:21351): avc:  denied  { sys_admin } for<br>
&gt;  pid=1903 comm=&quot;vsftpd&quot; capability=21<br>
&gt; scontext=unconfined_u:system_r:ftpd_t:s0<br>
&gt; tcontext=unconfined_u:system_r:ftpd_t:s0 tclass=capability<br>
<br>
</div></div>The above access vector (ftpd_t self:capability sys_admin;) should be allowed indeed.<br>
<br>
You can do this by piping the AVC denial line into the imput stream of the audit2allow command with the -M option and module name parameter:<br>
<br>
echo &quot;avc:  denied  { sys_admin } for pid=1903 comm=&quot;vsftpd&quot; capability=21 scontext=unconfined_u:system_r:ftpd_t:s0 tcontext=unconfined_u:system_r:ftpd_t:s0 tclass=capability&quot; | audit2allow -M myftpd<br>


<br>
Then you can install the generated custom module with the semodule command with the -i option and the module parameter:<br>
<br>
semodule -i myftpd.pp<br>
<br>
Not the i prefix the module name with &quot;my&quot;. This is done that this module will not overwrite the existing ftpd module.<br>
<br>
Any more AVC denials shown?<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div>Wow, thanks, I will try this when I get the time and the right head on. Get back to you later.</div><div><br></div><div>Thanks,</div><div><br></div><div>Aaron</div>

<div> </div></div>