<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SELinux on nagg.eu</title><link>https://nagg.eu/tags/selinux/</link><description>Recent content in SELinux on nagg.eu</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 23 Mar 2018 13:54:15 +0000</lastBuildDate><atom:link href="https://nagg.eu/tags/selinux/index.xml" rel="self" type="application/rss+xml"/><item><title>Nginx, PHP-FPM, SELinux and sendmail</title><link>https://nagg.eu/nginx-php-fpm-selinux-and-sendmail/</link><pubDate>Fri, 23 Mar 2018 13:54:15 +0000</pubDate><guid>https://nagg.eu/nginx-php-fpm-selinux-and-sendmail/</guid><description>&lt;p&gt;Since I am a real master at forgiving things I am writing this one down.&lt;br&gt;
PHP mail function relies on sendmail but SELinux by default block webservers from sending emails, the usual error that pop-out is:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;cat /var/log/maillog&amp;#34;&amp;gt;
---
sendmail[16328]: NOQUEUE: SYSERR(nginx): /etc/mail/sendmail.cf: line 0: cannot open: Permission denied
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Allow webservers to send email is as easy as editing the appropriate SELinux boolean:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;setsebool -P httpd_can_sendmail 1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Use &lt;code&gt;sestatus&lt;/code&gt; to check SELinux booleans:&lt;/p&gt;</description></item><item><title>Zabbix server on CentOS 7 and SELinux</title><link>https://nagg.eu/zabbix-server-on-centos-7-and-selinux/</link><pubDate>Mon, 23 Oct 2017 11:28:46 +0000</pubDate><guid>https://nagg.eu/zabbix-server-on-centos-7-and-selinux/</guid><description>&lt;p&gt;Zabbix is an open source resource and network monitoring system, more info: &lt;a href="https://www.zabbix.com/"&gt;zabbix.com&lt;/a&gt;.&lt;br&gt;
The official wiki is missing some important bits regarding the installation of the tool on CentOS 7 systems.&lt;br&gt;
First of all, let&amp;rsquo;s add Zabbix repository and then proceed to with the installation of Zabbix and some required dependecies:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
$ yum install mariadb mariadb-server httpd zabbix-server-mysql zabbix-web-mysql setroubleshoot
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id="configure-mariadb"&gt;Configure MariaDB&lt;/h1&gt;
&lt;p&gt;Login to MariaDB shell, change root&amp;rsquo;s password, create a new database for Zabbix and add a new user:&lt;/p&gt;</description></item><item><title>Samba 4, simple directory sharing</title><link>https://nagg.eu/samba-4_simple_directory_sharing/</link><pubDate>Sat, 19 Jan 2013 17:23:11 +0000</pubDate><guid>https://nagg.eu/samba-4_simple_directory_sharing/</guid><description>&lt;p&gt;With Samba being the clusterfuck it is, every time a new version is released
you have to expect something to be messed up.&lt;br&gt;
This time they added a bunch of new features like MS Active Directory support,
too bad that now the simple directory sharing is broken/not working like it did
before.&lt;br&gt;
Something like 1 year ago I wrote a small guide about how to setup a Samba
share on Centos 6 and I used the same smb.conf file on more than 10 machines
without any problem since yesterday, when I tried it on my fresh installed
Fedora 18 (which uses Samba 4.0.0). First of all, in the &amp;ldquo;Standalone Server
Options&amp;rdquo; is reported that &amp;ldquo;security&amp;rdquo; options &amp;ldquo;share and server&amp;rdquo; are deprecated;
too bad I just used &amp;ldquo;share&amp;rdquo; to save me the hassle of setting up a new user and
stuff even if I would like the directory to be fully accessible by everyone
without any restriction.&lt;br&gt;
I tried it anyway with &amp;ldquo;security = share&amp;rdquo; but there was no way to make the
folder accessible, when trying to access the Samba share I always got a popup
in which I had to login.&lt;br&gt;
So, at the end of the story, like it or not, I had to setup a new user, create
a samba user and edit the &amp;ldquo;smb.conf&amp;rdquo; file.&lt;/p&gt;</description></item></channel></rss>