DevHeads.net

protect apache to stop work if logdir is missing

Hi!

I need the web server to continue working if the user has deleted the
log directory.
I wrote a small patch. Are there any obvious errors in it that disrupt
the operation of the web server or lead to a memory / pointer leak?

Comments

Re: protect apache to stop work if logdir is missi

By LuKreme at 09/09/2019 - 12:07

On 9 Sep 2019, at 09:57, Anton Gorlov < ... at locum dot ru> wrote:
I would solve this by preventing the user from deleting the directory or recreating it on deletion, not by patching the source code.

Re: protect apache to stop work if logdir is missi

By stalker@locum.ru at 09/09/2019 - 12:13

09.09.2019 19:07, @lbutlr пишет:

Re: protect apache to stop work if logdir is missi

By LuKreme at 09/09/2019 - 12:24

On 9 Sep 2019, at 10:13, Anton Gorlov < ... at locum dot ru> wrote:
Why not? If that is the case, do not put the log folders in the user’s space and instead replicate logs for the users who do want them.

Either way, patching the source code doesn’t seem like the solution.

Re: protect apache to stop work if logdir is missi

By D'Arcy J.M. Cain at 09/09/2019 - 12:22

On 9/9/19 12:13 PM, Anton Gorlov wrote:
Wait. You can't protect directories from your users but you can
manually modify core programs that run on the server? What information
is missing here?

Hint: The log directories don't need to be in the user's home folder.
You can put them in a protected area and just symlink to them. That way
the user can blow away his own access to his logs but not the logs
themselves.

Re: protect apache to stop work if logdir is missi

By stalker@locum.ru at 09/09/2019 - 13:21

09.09.2019 19:22, D'Arcy Cain пишет:
I need to provide users with the ability to archive logs on their own