G
G
greengarlic2011-04-22 20:38:03
linux
greengarlic, 2011-04-22 20:38:03

/etc/init.d/httpd and /usr/sbin/httpd?

faced such a problem that if Apache is running /etc/init.d/httpd then the rights to create files are lost, that is, you cannot create a single file / directory even if you set 777 for everything. But if you run Apache from /usr/sbin/httpd, then everything is fine. However, it is strange, strange that everything was launched from the root and the rights to httpd from both directories were the same.
Explain why this is so?
Thank you!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
smartly, 2011-04-22
@smartly

Heh. selinux and NetworkManager are such unusual entities that it's easier to disable than to overcome.

Z
Zazza, 2011-04-22
@Zazza

you need to look at the logs, namely, what does apache write when it tries to create a folder-file, maybe it's suexec? apache is usually run from init.d under www-data or www. What's the axle?

G
greengarlic, 2011-04-22
@greengarlic

OS Fedora 14, found something interesting in the logs, here is the line when running with /etc/
[Fri Apr 22 20:52:06 2011] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
and here is what it says if with /usr/
[Fri Apr 22 20:26:59 2011] [notice] SELinux policy enabled; httpd running as context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
as I understand it SELinux somehow interferes with the work?

S
shadowalone, 2011-04-23
@shadowalone

A fairly detailed description - fedoraproject.org/wiki/SELinux/apache
Enough to figure it out once, then it will be easier :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question