LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2010, 02:54 PM   #1
romko
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Rep: Reputation: 0
Syslog rotate problem


Hello everyone!!!

I'm not very experienced with Linux and need help. I'm running SLES 9 where I set up syslog archiving. It collects logs fine but rotation is not working. Every time I try to restart script it gives me "Permissions denied" error.

this is how it looks:
Code:
#
# Please note, that changing of log file permissions in this
# file is not sufficient if syslog-ng is used as log daemon.
# It is required to specify the permissions in the syslog-ng
# configuration /etc/syslog-ng/syslog-ng.conf.in as well.
#

#
# The following files are used in syslog-ng config:
#
/var/log/acpid /var/log/messages {
    compress
    weekly
    missingok
    notifempty
    sharedscripts
    postrotate
        /etc/init.d/syslog reload
    endscript
}
These are permissions:

-rw-r--r-- 1 root root 1764 Jun 2 2009 syslog
-rw-r--r-- 1 root root 1014 Mar 10 11:46 syslog-ng


Any advise will be appreciated.

Last edited by romko; 06-18-2010 at 04:01 PM.
 
Old 06-18-2010, 03:02 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,867

Rep: Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780
Welcome to LQ.

Your script does not look correct (or may be it is not complete ?).

First it should begin with a sha-bang like this:
Code:
#!/bin/sh
Please send it again (copy/paste everything) surrounded by CODE markup (click the Go advanced button then highlight the code and press the # button to do that)

Last edited by Didier Spaier; 06-18-2010 at 03:05 PM.
 
Old 06-22-2010, 10:06 AM   #3
romko
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Here it is
 
Old 06-22-2010, 10:13 AM   #4
LouRobytes
Member
 
Registered: Mar 2010
Location: Nova Scotia, Canada
Distribution: Ubuntu & Fedora
Posts: 189

Rep: Reputation: 44
Think you left something out of your last post.

Cheers, Lou
 
Old 06-22-2010, 11:09 AM   #5
romko
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Corrected script post

Code:
#
# Please note, that changing of log file permissions in this
# file is not sufficient if syslog-ng is used as log daemon.
# It is required to specify the permissions in the syslog-ng
# configuration /etc/syslog-ng/syslog-ng.conf.in as well.
#

#
# The following files are used in syslog-ng config:
#
/var/log/acpid /var/log/messages {
    compress
    weekly
    missingok
    notifempty
    sharedscripts
    postrotate
        /etc/init.d/syslog reload
    endscript
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rotate display -- Option "Rotate" "CCW" Brad.Scalio@noaa.gov Linux - General 0 01-27-2009 06:32 AM
LXer: Centralized Syslog Server Using syslog-NG LXer Syndicated Linux News 0 04-28-2006 07:21 PM
how do I rotate the syslog jonsag Linux - Newbie 3 12-19-2004 03:33 PM
merging the syslog rotate scripts monkeywrench Debian 0 11-18-2004 07:33 PM
Problem with squid and rotate chamkila Linux - General 1 05-15-2003 06:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration