Bug 323251 - After some selinux update php stopped sending e-mails
After some selinux update php stopped sending e-mails
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
7
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-08 12:19 EDT by Ondrej Svetlik
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-09 11:04:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ondrej Svetlik 2007-10-08 12:19:32 EDT
Description of problem:
On my webserver everything worked fine with selinux in Enforcing mode. But after
one of updates, selinux makes PHP to log:
sh: /usr/sbin/sendmail: Permission denied
And no mail is sent.

Version-Release number of selected component (if applicable):
selinux-policy-2.6.4-46.fc7
selinux-policy-targeted-2.6.4-46.fc7
sendmail-8.14.1-4.2.fc7
httpd-2.2.6-1.fc7
php-eaccelerator-0.9.5.1-3.fc7
php-bcmath-5.2.4-1.fc7
php-mysql-5.2.4-1.fc7
php-gd-5.2.4-1.fc7
php-xml-5.2.4-1.fc7
php-5.2.4-1.fc7
php-pecl-xdebug-2.0.0-2.fc7
php-Smarty-2.6.18-1.fc7
php-channel-phpunit-1.0-2.fc7
php-pgsql-5.2.4-1.fc7
php-pdo-5.2.4-1.fc7
php-cli-5.2.4-1.fc7
php-common-5.2.4-1.fc7
php-mbstring-5.2.4-1.fc7
php-ldap-5.2.4-1.fc7


How reproducible:
always


Steps to Reproduce:
1.setenfore Enforcing
2.access a PHP page that sends an e-mail (mail() or pear's Mail)
3.I tried to set Mail to use SMTP, but there was also Permission denied error
while connecting to the port.

Actual results:
in error_log appears a line:
sh: /usr/sbin/sendmail: Permission denied
and no mail


Expected results:
No error in the log and a mail being sent.
Comment 1 Ondrej Svetlik 2007-10-08 12:21:30 EDT
from php.ini:
sendmail_path = "/usr/sbin/sendmail -t -i -O DeliveryMode=q"
Comment 2 Daniel Walsh 2007-10-09 10:53:25 EDT
Do you have the httpd_can_sendmail boolean turned on ?

getsebool -a | grep send
httpd_can_sendmail --> on


setsebool -P httpd_can_sendmail 1

Will turn it on.
Comment 3 Ondrej Svetlik 2007-10-09 11:04:22 EDT
Oh, I don't :-). Thanks a lot.

Note You need to log in before you can comment on or make changes to this bug.