T
T
Twelfth Doctor2016-12-08 20:43:30
Apache HTTP Server
Twelfth Doctor, 2016-12-08 20:43:30

How to run Apache virtual host as root?

Hello! Such a question: Apache runs in MPM-ITK mode, i.e. PHP scripts can be executed on behalf of different users. In the AssignUserID directive, I registered the root user and the root group, the owner of all files and folders is root, all files and folders have rights of 700.
But when I enter the site, I see an error 500.
In the logs I see this:

[Thu Dec 08 20:23:02.723581 2016] [mpm_itk:warn] [pid 4034] (itkmpm: pid=4034 uid=33, gid=33) itk_post_perdir_config(): setgid(0): Operation not permitted
[Thu Dec 08 20:23:02.723649 2016] [mpm_itk:notice] [pid 4034] This is most likely due to the current LimitGIDRange setting.
[Thu Dec 08 20:24:13.028562 2016] [mpm_itk:warn] [pid 4041] (itkmpm: pid=4041 uid=33, gid=33) itk_post_perdir_config(): setgid(0): Operation not permitted
[Thu Dec 08 20:24:13.028651 2016] [mpm_itk:notice] [pid 4041] This is most likely due to the current LimitGIDRange setting.
[Thu Dec 08 20:24:13.370128 2016] [mpm_itk:warn] [pid 4042] (itkmpm: pid=4042 uid=33, gid=33) itk_post_perdir_config(): setgid(0): Operation not permitted
[Thu Dec 08 20:24:13.370197 2016] [mpm_itk:notice] [pid 4042] This is most likely due to the current LimitGIDRange setting.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CityCat4, 2016-12-08
@CityCat4

Are you making a sandbox? For novice hackers practicing hacking servers? I just can’t think of any other use for running Apache from root :)
Any service running from root is a potential target of an attack, and even more so Apache

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question