LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-17-2015, 12:43 PM   #1
Lnthink
Member
 
Registered: May 2010
Location: Lafayette, LA
Distribution: Ubuntu, RH, Fedora
Posts: 44

Rep: Reputation: 11
NA


Removed -

Last edited by Lnthink; 04-17-2015 at 01:01 PM. Reason: unneeded
 
Old 04-17-2015, 01:05 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
And ... I guess it got solved as I was typing ...

Well, below was my half amateur attempt at offering a solution. Sounds like you self-resolved this.

A good thing to consider would be to leave your original problem description, and post a note as to what you did to solve this, even if it was as minor as you realized you just did a stupid thing or something. Otherwise the presence of this thread now is pointless and doesn't help the next person who may happen to have problems with post-rotation using logrotate ...

------------------ IGNORE BELOW SINCE IT WAS SOLVED ------------------

Well in this case a script in /etc/init.d is likely owned by root and hence when you run it as root via direct command line, this is why it works.

Although I'm unsure why logrotate being run from the daemon doesn't have root privileges anyways ...

A suggestion is to run the post rotate script employing the use of sudo?

A further suggestion it to run a regular command also as part of the post rotate steps to just annotate the current time and date to a log file. Sort of a flag to validate that post rotation script actions occurred.

Last edited by rtmistler; 04-17-2015 at 01:08 PM. Reason: Huh? Solved already?
 
1 members found this post helpful.
Old 04-20-2015, 08:46 AM   #3
Lnthink
Member
 
Registered: May 2010
Location: Lafayette, LA
Distribution: Ubuntu, RH, Fedora
Posts: 44

Original Poster
Rep: Reputation: 11
Yes, it was in the realm of stupid. But I think you very much for your advice.
In my efforts to troubleshoot issues - I had put logrotated in "-d" debug mode.
Which, after some digging, I found out not only gives you debug output - but also puts everything in a simulated mode, and it runs nothing.
So, yes, I felt extremely stupid, and just wanted to delete the thread. I couldn't so I thought I could blow away the thread before any responses.
I apparently whiffed that one.

I sincerely appreciate your kind offer to help.
 
  


Reply

Tags
logrotate



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
postrotate in logrotate srinadi Linux - Newbie 2 08-28-2012 08:45 PM
Logrotate - Purpose of rotate and postrotate fizeelinux Linux - Newbie 5 07-14-2010 04:00 AM
error running postrotate script linux_bud Linux - Server 1 04-05-2010 02:29 AM
Logrotate problem - postrotate: command not found humbletech99 Linux - General 2 01-14-2007 10:49 AM
Error running postrotate script... Jake_B Red Hat 0 09-19-2005 04:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:14 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
Open Source Consulting | Domain Registration