FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-26-2008, 11:59 AM
 
Default problem with logcheck

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@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.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-26-2008, 12:36 PM
Mathias Chauvin
 
Default problem with logcheck

Hi,

If you run logcheck with the -d option, (for debug), you'll see that
your problem probably comes from permissions on
/etc/logcheck/locheck.conf.

user@host:~# /usr/sbin/logcheck -d
D: [1211805259] Turning debug mode on
D: [1211805259] Sourcing - /etc/logcheck/logcheck.conf
D: [1211805259] Error: Config file /etc/logcheck/logcheck.conf could not
be read

Hope this helps!

On Mon, May 26, 2008 at 01:59:15PM +0200, mitchou25@free.fr wrote:
>
>
> 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@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.
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>

--
IT Stuff on http://blog.mc-thias.org
http://photos.mc-thias.org
Thias


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 03:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org