FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora SELinux Support

 
 
LinkBack Thread Tools
 
Old 07-30-2008, 02:10 PM
Ingemar Nilsson
 
Default Apache Httpd, PHP, Smarty and SELinux

Hi.

Yesterday I set up a small PHP web service on one of our CentOS 5
servers. It uses Smarty for templating, with the dynamically compiled
templates being stored in a directory with SELinux context
rootbject_r:httpd_sys_content_t. The system runs with SELinux in
enforcing mode, with httpd using the context root:system_u:httpd_t.


For the fun of it, I looked through the SELinux policy allow rules, but
I couldn't find a rule that says that processes in the httpd_t domain
can write to files labeled httpd_sys_content_t, but it does anyway.


I got the (supposedly) complete list of active policy rules using the
command


sesearch -a

Running the command

sesearch -a | grep 'httpd_t ' | grep httpd_sys_content_t

produces the following list:

allow httpd_t httpd_sys_content_t : file { ioctl read getattr lock };
allow httpd_t httpd_sys_content_t : dir { ioctl read getattr lock
search };
allow httpd_t httpd_sys_content_t : lnk_file { ioctl read getattr
lock };

allow httpd_t httpd_sys_content_t : file { ioctl read getattr lock };
allow httpd_t httpd_sys_content_t : dir { ioctl read getattr lock
search };

allow httpd_t httpd_sys_content_t : lnk_file { read getattr };
type_transition httpd_t httpd_sys_content_t : process
httpd_sys_script_t;


I don't see any rule that allows httpd_t processes to write to
httpd_sys_content_t directories. What is going on?


Regards
Ingemar

--
fedora-selinux-list mailing list
fedora-selinux-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-selinux-list
 

Thread Tools




All times are GMT. The time now is 07:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org