View previous topic :: View next topic |
Author |
Message |
VLegacy n00b
Joined: 06 Aug 2004 Posts: 24 Location: Virginia, USA
|
Posted: Tue Apr 11, 2006 12:22 am Post subject: chrooted thttpd and logging |
|
|
I'm setting up thttpd on my server, and came across this in the chroot section of its man page:
Quote: | However, one thing you should do is tell syslogd about the chroot tree, so that thttpd can still generate syslog messages. Check your system's syslodg man page for how to do this. In FreeBSD you would put something like this in /etc/rc.conf:
syslogd_flags="-l /usr/local/www/data/dev/log"
Substitute in your own chroot tree's pathname, of course. Don't worry about creating the log socket, syslogd wants to do that itself. (You may need to create the dev directory.) In Linux the flag is -a instead of -l, and there may be other differences. |
Metalog is my system logger. If a similar procedure to the one described above is necessary with Gentoo and Metalog, what exactly do I need to do? Or does Metalog not need to be involved at all - is it simply a matter of telling thttpd to log to a file within its chroot?
Thanks. |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Tue Apr 11, 2006 11:52 pm Post subject: |
|
|
Considering that passing metalog '-a' as a command line option causes it to log asynchronously (the default) I doubt that is the effect that you are in search of.
Logging to a file is one option, but it does leave the file at risk if someone manages to compromise thttpd.
Having looked briefly at the documentation for metalog I found no way to get it to read from additional logging sources, so perhaps a backdoor approach is in order. Something along the lines of create a named pipe at /dev/log under the chroot and before starting thttpd start a script outside the chroot which reads from that pipe and writes it all to the actual /dev/log, something along the lines of:
thttpdlogviachroot.sh: | #!/bin/bash
: </usr/local/www/data/dev/log > /dev/log |
|
|
Back to top |
|
|
VLegacy n00b
Joined: 06 Aug 2004 Posts: 24 Location: Virginia, USA
|
Posted: Wed Apr 12, 2006 9:51 am Post subject: |
|
|
Thanks for the reply, desultory.
I'm not too worried about thttpd being compromised, since this is just a personal server of mine, not anything business related, so I think I'll just log to a file in the chroot for the time being. Maybe when I have more time I'll look into doing something like what you suggested.
Thanks again. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|