Linux2008/09/18 14:04
현재 서버에는 내부 네임서버로서 BIND를 운영하고 있습니다.

그런데 아래와 같은 메시지가 로그파일에서 계속 확인이 되더군요.
로그파일은 /var/log/message 입니다.

starting BIND 9.x.x-xx -u named -t /var/named/chroot
Sep 18 13:33:28 oneday named[6587]: found 2 CPUs, using 2 worker threads
Sep 18 13:33:28 oneday named[6587]: loading configuration from '/etc/named.conf'
Sep 18 13:33:28 oneday named[6587]: the working directory is not writable
Sep 18 13:33:28 oneday named[6587]: listening on IPv4 interface eth1, 192.168.x.xxx#53
Sep 18 13:33:28 oneday named[6587]: default max-cache-size (33554432) applies

"the working directory is not writable"

에러메시지는 아니지만.. 무엇인지는 잘 모르지만... 하여튼 작업디렉토리에 무언가를 쓸 수 없다는 겁니다. 뭐 Critical도 아니고 Fatal도 아니고.. 또한 네임서버도 잘 움직이고 있으니 특별히 문제가 되지는 않을 듯 하지만 찜찜하네요. 네임서버 환경설정 파일을 살펴볼까요.

less /etc/named.conf
options {
        listen-on port 53 { 192.168.x.xxx; };
#       listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
#       allow-query     { localhost; };
        allow-query     { any; };
        recursion yes;
};
.
.

네... 디렉토리 설정하는 곳이 있네요. /var/named 입니다.
그런데 /var/named 디렉토리를 보시면 중요 파일들은 모두 chroot 밑의 /var/named에 심볼릭 링크가 설정되어 있군요. 아하~ 그렇다면 /var/named 가 아니라 /var/named/chroot/var를 보겠습니다.

# ls -l /var/named/chroot/var
drwxrwx--- 2 named named 4096 2008-08-06 19:08 log
drwxr-x--- 5 root  named 4096 2008-08-06 19:08 named
drwxr-x--- 3 root  named 4096 2003-03-14 08:22 run
drwxrwx--- 2 named named 4096 2003-03-14 08:22 tmp

이런.. named 프로세스는 named유저에 의해 실행되는데... named유저의 소속그룹 named그룹에 대한 쓰기 권한이 설정되어 있지 않네요(아우.. 먼가 말이 복잡하다..)

자 아래와 같은 명령어를 실행하여 문제를 해결하시면 됩니다.

# chmod g+w /var/named/chroot/var/named
또는
# chmod 770 /var/named/chroot/var/named


크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by Onedayth

TRACKBACK http://linuxwin.com/trackback/34 관련글 쓰기

댓글을 달아 주세요