Nginx, PHP-FPM, SELinux and sendmail

Since I am a real master at forgiving things I am writing this one down. PHP mail function relies on sendmail but SELinux by default block webservers from sending emails, the usual error that pop-out is: cat /var/log/maillog"> --- sendmail[16328]: NOQUEUE: SYSERR(nginx): /etc/mail/sendmail.cf: line 0: cannot open: Permission denied Allow webservers to send email is as easy as editing the appropriate SELinux boolean: setsebool -P httpd_can_sendmail 1 Use sestatus to check SELinux booleans: …

Posted on

Zabbix server on CentOS 7 and SELinux

Zabbix is an open source resource and network monitoring system, more info: zabbix.com. The official wiki is missing some important bits regarding the installation of the tool on CentOS 7 systems. First of all, let’s add Zabbix repository and then proceed to with the installation of Zabbix and some required dependecies: $ 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 Configure MariaDB Login to MariaDB shell, change root’s password, create a new database for Zabbix and add a new user: …

Posted on

Samba 4, simple directory sharing

With Samba being the clusterfuck it is, every time a new version is released you have to expect something to be messed up. 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. 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 “Standalone Server Options” is reported that “security” options “share and server” are deprecated; too bad I just used “share” 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. I tried it anyway with “security = share” 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. 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 “smb.conf” file. …

Posted on