[Logcheck-users] problem to run logcheck

mitchou25 at free.fr
Mon, 26 May 2008 12:18:03 -0000

Hello

I try to execute logcheck from a php page. So I have create a php page with a
button which allow to run logcheck like this : /usr/sbin/logcheck -o >
/var/log/logcheck

(I want to put the result in a file logcheck, that's why I use the option
-o)

I have put www-data in the groupe adm : "adduser www-data adm"

 And after if I run logcheck like this for exemple:
 ---------------------------------------------------------------------

 # root:~#"su -s /bin/bash -c "/usr/sbin/logcheck -o >
/var/log/logcheck"
 www-data"

    --> there is nothing

 # www-data at host:~/usr/sbin/logcheck -o > /var/log/logcheck

   --> There is nothing

 # root:~#su -s /bin/bash -c "/usr/sbin/logcheck -o >
/var/log/logcheck"
 logcheck"

   --> I have the resultat in my file /var/log/logcheck.

 ------------------------------------------------------------------------

My permissions are :

/var/log/
 -rw-r----- 1 root        adm   15158507 2008-05-21 17:47 syslog
 -rw-r----- 1 root        adm  156754503 2008-05-21 17:47 user.log
 -rw-r----- 1 root        adm     156259 2008-05-21 17:47 messages
 -rw-r----- 1 root        adm      90975 2008-05-21 17:45 auth.log
 -rw-r----- 1 root        adm     362097 2008-05-21 17:47 daemon.log
 -rwxrwxrwx 1 root        adm          0 2008-05-22 09:24 logcheck

/usr/sbin/
 -rwxr-xr-x 1 root adm 21409 2007-01-30 07:40 logcheck


I don't understand why I don't arrive to execute logcheck from my php
page...

It's work only in a console when I am root and that I execute : su -s
/bin/bash
-c "/usr/sbin/logcheck -o > /var/log/logcheck"

Can you help me please ?
thank you very much.