working directory not writable
Steven P Vallière
bind9 at e-visions.com
Wed Jul 16 13:59:15 UTC 2008
I just read through a recent discussion about this
problem(?), which I also have on my system, but saw
mostly arguments about the merits of various OSes
and configurations. I didn't see anything about the
actual issue itself, so I'm going to ask again, and
begin with the results of my own experiments...
When I upgraded to the latest BIND9, I discovered
that a new check had been added that was causing
'the working directory is not writable'
to be logged when named started. Within a minute or
two though, named started /writing/ to files in that
directory anyway (well, their content and timestamps
changed, I /think/ that qualifies as writing).
Curios about the problem, I added some diagnostics to
the code where the error was being logged, like this
(from around line 2953 in bin/named/server.c):
if (access(".", W_OK) != 0) {
char pwd[256];
char err[256];
strcpy(err,strerror(errno));
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
"the working directory (%s) is not writable [%s] by u%d g%d",
getcwd(pwd,sizeof(pwd)), err, geteuid(), getegid());
}
(I know it isn't pretty, but it is only temporary)
I was not quite prepared for what was logged:
the working directory (/var/named) is not writable [Permission
denied] by u0 g0
(sorry for the wrap)
Other info:
More information about the bind-users
mailing list