2.0.4b: logrotate problems with rh60

Stephen L Arnold arnold.steve at ensco.com
Thu Jul 15 16:59:56 GMT 1999

When the world was young, giulioo at tiscalinet.it carved some runes 
like this:  

> Because they are not "computer persons", they like to switch off
> everything when they go home. There is no way I can convince
> them. 

Just tell them "it's a server, not a desktop, plus it's a real OS, 
not windoze.  It needs to get chores done overnight."  Put it on an 
UPS and take away the monitor...  Even the construction weenies I 
helped setup a linux/samba/ip-masq gateway for have learned to 
leave that box alone.


> Yes logortate creates the new files, but samba keeps logging to
> the old one: logrotate creates log.smb, samba logs to log.smb.1 

That is not the behavior I'm seeing with 1.9.18 (but it's going to 
be a little while before I can start testing 2.0.x at home).

> For this reason I ask you if samba would create a file by its
> own; if we don't consider logrotate at all, and: - mv
> /var/log/samba/log.smb /var/log/samba/log.smb.old - killall -HUP
> smbd.

What if you try the above (mv, HUP) with this in between:
touch /var/log/samba/log.smb?  Does samba start logging to the new 

> Will samba a) create a new log.smb file and log to it?

That's what I see with 1.9.18

> b) keep logging to log.smb.old ? 

That's probably not the correct behavior.

> On my system it's b). If it is so by design, then even if
> logrotate creates the new file for samba, samba will ignore it
> and keep logging to the old one (this is what I see). Yes, I see
> the new file logrotate creates, but it is empty, till the next
> samba restart. 

It could be a bug in samba, but I would think something like that 
would not slip through.  Maybe it's a side effect of the kernel or 
glibc changes; are you running the RedHat binary, or did you 
compile from source?  Could it be related to the 64-bit file 
locking glitch?  I'm just guessing now, since I haven't yet played 
with this combination (kernel 2.2x, samba 2.x, glibc 2.1).

In general, I would recommend compiling samba, the kernel, and any 
other related components yourself.

HTH, Steve

Stephen L Arnold                      http://www.rain.org/~sarnold
#include <std_disclaimer.h>

More information about the samba mailing list