<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=SELinux</id>
	<title>SELinux - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=SELinux"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=SELinux&amp;action=history"/>
	<updated>2026-08-22T05:32:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=SELinux&amp;diff=3315&amp;oldid=prev</id>
		<title>Admin: 3 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=SELinux&amp;diff=3315&amp;oldid=prev"/>
		<updated>2016-04-06T20:36:22Z</updated>

		<summary type="html">&lt;p&gt;3 revisions imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:36, 6 April 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bestpractical_mediawiki1459887241:diff:1.41:old-3314:rev-3315 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=SELinux&amp;diff=3314&amp;oldid=prev</id>
		<title>161.50.48.2: added command for RT4 on Scientific Linux  6.2</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=SELinux&amp;diff=3314&amp;oldid=prev"/>
		<updated>2012-07-05T05:57:50Z</updated>

		<summary type="html">&lt;p&gt;added command for RT4 on Scientific Linux  6.2&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== What Is This? ==&lt;br /&gt;
&lt;br /&gt;
 Security-enhanced Linux  (SELinux) is an implementation of a mandatory access control mechanism.This&lt;br /&gt;
 mechanism is in the Linux kernel, checking for allowed operations after standard Linux discretionary&lt;br /&gt;
 access controls are checked.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
For more information check the [http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/selinux-guide/ SELinux Guide] provided by [[RedHat]].&lt;br /&gt;
&lt;br /&gt;
== Simple ==&lt;br /&gt;
&lt;br /&gt;
This cargo-culted command from a Rails tutorial worked for me under RHEL 4:&lt;br /&gt;
&lt;br /&gt;
 chcon -Rv user_u:object_r:httpd_user_content_t /opt/rt3/var/&lt;br /&gt;
&lt;br /&gt;
The above was all that was required to get RT 3.8 running under [[SELinux]] for me, until the machine became its own (primary, and no longer relaying) mail server. At that point RT began trying to exec sendmail, which in my config was a link since I was running postfix. Notifications went undelivered and messages showed:&lt;br /&gt;
&lt;br /&gt;
 Nov  8 18:48:47 rt kernel: audit(1226188127.916:114): avc:  denied  { read } for  pid=10271 comm=&amp;quot;httpd.worker&amp;quot; name=&amp;quot;sendmail&amp;quot; dev=dm-0 ino=4464227 scontext=user_u:system_r:httpd_t tcontext=user_u:object_r:sbin_t tclass=lnk_file&lt;br /&gt;
&lt;br /&gt;
My solution was to hardlink /usr/sbin/sendmail.postfix to /usr/sbin/sendmail&lt;br /&gt;
&lt;br /&gt;
Under Scientific Linux release 6.2 (Carbon) running rt4, the chcon command needed another SELinux context:&lt;br /&gt;
 chcon -Rv user_u:object_r:httpd_user_content_t:s0 /opt/rt4/var/&lt;br /&gt;
&lt;br /&gt;
== Thorough ==&lt;br /&gt;
&lt;br /&gt;
start of information regarding creating a selinux policy for FC4 and RT&lt;br /&gt;
&lt;br /&gt;
 cd /etc/selinux/targeted/src/policy&lt;br /&gt;
 vi domains/misc/local.te&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
add...&lt;br /&gt;
&lt;br /&gt;
 allow httpd_t httpd_log_t:dir create;&lt;br /&gt;
 allow httpd_t httpd_tmp_t:sock_file { create setattr unlink write };&lt;br /&gt;
 allow httpd_t httpd_log_t:sock_file { create setattr unlink write };&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
&lt;br /&gt;
 make load&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
use audit2allow to convert the stuff from dmesg or /var/log/messages to that format.&lt;br /&gt;
&lt;br /&gt;
also need to figure out how to set the context of files, because the stuff in $RT/var needs to be writable by the httpd_t process.&lt;br /&gt;
&lt;br /&gt;
Here are my changes for running RT 3.4.5 under FC4 and SE Linux. I have rt installed in /srv/rt3 and mysql in /srv/mysql:&lt;br /&gt;
&lt;br /&gt;
local.te:&lt;br /&gt;
&lt;br /&gt;
 allow httpd_t httpd_sys_script_t:process { noatsecure rlimitinh siginh };&lt;br /&gt;
 allow httpd_t nscd_var_run_t:dir search;&lt;br /&gt;
 &lt;br /&gt;
 allow httpd_sys_script_t devlog_t:sock_file write;&lt;br /&gt;
 allow httpd_sys_script_t httpd_log_t:file ioctl;&lt;br /&gt;
 allow httpd_sys_script_t httpd_sys_script_exec_t:dir read;&lt;br /&gt;
 allow httpd_sys_script_t httpd_t:unix_stream_socket { accept getattr ioctl shutdown read write };&lt;br /&gt;
 allow httpd_sys_script_t mail_spool_t:dir search;&lt;br /&gt;
 allow httpd_sys_script_t mqueue_spool_t:file read;&lt;br /&gt;
 allow httpd_sys_script_t mysqld_db_t:lnk_file read;&lt;br /&gt;
 allow httpd_sys_script_t nscd_var_run_t:dir search;&lt;br /&gt;
 allow httpd_sys_script_t self:unix_dgram_socket { create connect ioctl write };&lt;br /&gt;
 allow httpd_sys_script_t syslogd_t:unix_dgram_socket sendto;&lt;br /&gt;
 allow httpd_sys_script_t system_mail_t:process { noatsecure rlimitinh siginh };&lt;br /&gt;
 allow httpd_sys_script_t var_log_t:file { append ioctl };&lt;br /&gt;
 &lt;br /&gt;
 allow system_mail_t httpd_log_t:file { append getattr };&lt;br /&gt;
 allow system_mail_t httpd_sys_script_t:unix_stream_socket { read write };&lt;br /&gt;
 allow system_mail_t httpd_t:unix_stream_socket { read write };&lt;br /&gt;
 allow system_mail_t nscd_var_run_t:dir search;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
local.fc:&lt;br /&gt;
&lt;br /&gt;
 /srv                            system_u:object_r:root_t&lt;br /&gt;
 /srv/mysql(/.*)?            system_u:object_r:mysqld_db_t&lt;br /&gt;
 /srv/mysql/mysql\.sock -s   system_u:object_r:mysqld_var_run_t&lt;br /&gt;
 &lt;br /&gt;
 /srv/rt3                                system_u:object_r:httpd_sys_content_t&lt;br /&gt;
 /srv/rt3/bin(/.*)?          system_u:object_r:httpd_sys_script_exec_t&lt;br /&gt;
 /srv/rt3/etc(/.*)?                              system_u:object_r:httpd_sys_content_t&lt;br /&gt;
 /srv/rt3/lib(/.*)?          system_u:object_r:httpd_sys_content_t&lt;br /&gt;
 /srv/rt3/local(/.*)?                    system_u:object_r:httpd_sys_content_t&lt;br /&gt;
 /srv/rt3/sbin                           root:object_r:default_t&lt;br /&gt;
 /srv/rt3/share(/.*)?        system_u:object_r:httpd_sys_content_t&lt;br /&gt;
 /srv/rt3/var                            system_u:object_r:httpd_sys_content_t&lt;br /&gt;
 /srv/rt3/var/mason_data(/.*)?   system_u:object_r:httpd_sys_content_t&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
The [[PostQuestionsHere]] page for some [[SELinux]] answers.&lt;/div&gt;</summary>
		<author><name>161.50.48.2</name></author>
	</entry>
</feed>