LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 01: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 03:01 PM.
 
Old 06-18-2010, 02:02 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
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 02:05 PM.
 
Old 06-22-2010, 09:06 AM   #3
romko
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Here it is
 
Old 06-22-2010, 09: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, 10: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



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 05:32 AM
LXer: Centralized Syslog Server Using syslog-NG LXer Syndicated Linux News 0 04-28-2006 06:21 PM
how do I rotate the syslog jonsag Linux - Newbie 3 12-19-2004 02:33 PM
merging the syslog rotate scripts monkeywrench Debian 0 11-18-2004 06:33 PM
Problem with squid and rotate chamkila Linux - General 1 05-15-2003 05:46 PM

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

All times are GMT -5. The time now is 01:02 AM.

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
Open Source Consulting | Domain Registration