AW: Log file will not roll

Barry Margolin barmar at alum.mit.edu
Fri Nov 5 05:07:51 UTC 2004


In article <cmdt6u$131q$1 at sf1.isc.org>, vze78se7 at verizon.net wrote:

> On Thu, 4 Nov 2004 09:06:43 +0100, "Walkenhorst, Benjamin"
> <Benjamin.Walkenhorst at telekom.de> wrote:
> 
> >Hello,
> >
> >
> >> Does the file rolling have to do with a permissions issue or is it a
> >> different problem?
> >
> >Did you check the permissions for the folder your log files live in?
> >To create or remove a file, you need write permission on the folder.
> >
> >Kind regards,
> >Benjamin
> >
> Thanks Benjamin:
> 
> The folder "/var/log" (where the named logs are being written) is:
> 
> drwxr-xr-x
> 
> --and is owned by root
> 
> the log file itself is owned by a user/group called named, and is 
> -rw-r--r--

Sounds like you're using the setuid feature of BIND.  So named is 
running under the userid "named", which doesn't have permission to 
create a new log file in that directory.

Change the logging configuration in named.conf so it writes to a 
directory that named has write permission for.

> 
> however, if BIND can write to the original log file, why wouldn't it
> be able to roll it to a new file?

When named first starts up, it's running as root and opens the log file.  
Then it changes to the userid you specified.  Since file permissions are 
only checked when a file is opened, it can still write to the log file.  
But it can't create a new log file in that directory.

> 
> Anyway, I ended up touching a new file, chown'ing it to named:named,
> and changed the log file in named.conf...and it all seems to be
> working ok now!

But it will fail when it tries to roll over again.  Fix your 
configuration as I described above.

-- 
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***



More information about the bind-users mailing list