Skip to contentSkip to conversation

apache rule to make it write in directory

DISCUSSION Pascal Hahn 2 participants 4 messages Jun 24, 2004 – Jun 25, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi there,

I got the problem that my apache2 under selinux running on gentoo linux is not able to write to a certain directory under htdocs which i need to be writable.

I need a rule to make it write in that directory but didnt find a possibility to do so by now.

Perhaps someone can help me out here.

Thanks

Pascal Hahn

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 8 lines · Pascal Hahn

I got the problem that my apache2 under selinux running on gentoo linux is not able to write to a certain directory under htdocs which i need to be writable.

I need a rule to make it write in that directory but didnt find a possibility to do so by now.

Perhaps someone can help me out here.

Please show us the AVC messages from the access that is denied and then it should be easy to demonstrate how to customise the policy to do what you require.

Signature · 9 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 7 lines · Russell Coker
Quoted 4 lines · Pascal Hahn

I got the problem that my apache2 under selinux running on gentoo linux is not able to write to a certain directory under htdocs which i need to be writable.

Quoted 11 lines
Quoted 6 lines

I need a rule to make it write in that directory but didnt find a possibility to do so by now.

Perhaps someone can help me out here.

Please show us the AVC messages from the access that is denied and then it should be easy to demonstrate how to customise the policy to do what you require.

heres my output i get from avc messages:

/Jun 16 13:39:36 lboxx avc: denied { write } for pid=3161 exe=/usr/sbin/apache2 path=/var/www/localhost/lwa/infos/auth.tmp dev=hdc6 ino=96389 scontext=system_u:system_r:httpd_t tcontext=system_u:object_r:httpd_sys_content_t tclass=file

Jun 16 16:22:16 lboxx avc:  denied  { write } for  pid=3215 exe=/usr/sbin/apache2 name=infos dev=hdc6 ino=96403 scontext=system_u:system_r:httpd_t tcontext=system_u:object_r:httpd_sys_content_t tclass=dir/

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#3 lore raw
Quoted 6 lines · Pascal Hahn

heres my output i get from avc messages:

/Jun 16 13:39:36 lboxx avc:  denied  { write } for  pid=3161 exe=/usr/sbin/apache2 path=/var/www/localhost/lwa/infos/auth.tmp dev=hdc6 ino=96389 scontext=system_u:system_r:httpd_t tcontext=system_u:object_r:httpd_sys_content_t tclass=file

Try the following:
file_type_auto_trans(httpd_t, httpd_sys_content_t, httpd_sys_script_rw_t, file)

Signature · 10 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.