This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 825357 - SELinux is not enforced when running httpd from the command line
SELinux is not enforced when running httpd from the command line
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
17
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-25 15:08 EDT by Kevin Clevenger
Modified: 2012-05-27 15:14 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-27 15:14:07 EDT
Type: Bug
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 Kevin Clevenger 2012-05-25 15:08:48 EDT
Description of problem:
When starting httpd with systemctl the httpd process runs with "system_u:system_r:httpd_t". When starting httpd from the command line the httpd process runs with "unconfined_u:unconfined_r:unconfined_t".

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.10.0-125.fc17.noarch
httpd-2.2.22-4.fc17.x86_64

How reproducible:
Run systemctl start httpd.service
Run httpd or httpd -X from the command line

Steps to Reproduce:
1. Run httpd or httpd -X from the command line 
2.
3.
  
Actual results:
httpd runs as unconfined_u:unconfined_r:unconfined_t

Expected results:
httpd runs as unconfined_u:system_r:httpd_t

Additional info:
Running httpd with FollowSymlinks and AllowOverride All. I'm symlinking a php webapp from ~/Sites/site to /var/www/html/site
Comment 1 Miroslav Grepl 2012-05-27 15:14:07 EDT
Yes, this is correct. You should not run httpd without the unit file. If you need this you can use runcon

# runcon -u system_u -r system_r -t initrc_t -- runcon -t httpd_t -- httpd -X

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