免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4778 | 回复: 1
打印 上一主题 下一主题

[DNS] slave DNS因权限问题无法从master获取zone文件 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-12 18:34 |只看该作者 |倒序浏览
named.conf_master

  1. options {
  2.         directory "/var/named";
  3. };
  4. // generated by named-bootconf.pl
  5. // secret must be the same as in /etc/rndc.conf
  6.         key "key"{
  7.         algorithm hmac-md5;
  8.         secret "IlhSBzERvAu7nnRoeCODXg==";
  9. };
  10. key "key_omccn."{
  11.         algorithm hmac-md5;
  12.         secret "eWQKxMk5vqsKhNm8aP1syg==";
  13. };
  14. controls{
  15.         inet 127.0.0.1 port 953 allow{
  16.                 127.0.0.1;
  17.         }       keys{
  18.                 "key";
  19.         };
  20. };
  21. zone "." {
  22.         type hint;
  23.         file "named.ca";
  24. };
  25. zone "dns" {
  26.         type master;
  27.         file "dns";
  28.         also-notify{
  29.                 211.136.115.221;
  30.         };
  31. };
  32. zone "mnc0007.mcc0460.gprs" {
  33.         type master;
  34.         file "mnc0007.mcc0460.gprs";
  35.         allow-update{
  36.                 localhost;
  37.         };
  38.         also-notify{
  39.                 211.136.115.221;
  40.         };
  41. };
  42. zone "mnc007.mcc460.gprs" {
  43.         type master;
  44.         file "mnc007.mcc460.gprs";
  45.         allow-update{
  46.                 localhost;
  47.         };
  48.         also-notify{
  49.                 211.136.115.221;
  50.         };
  51. };
  52. zone "mnc07.mcc460.gprs" {
  53.         type master;
  54.         file "mnc07.mcc460.gprs";
  55.         allow-update{
  56.                 localhost;
  57.         };
  58.         also-notify{
  59.                 211.136.115.221;
  60.         };
  61. };
  62. zone "cmcc.cn.gprs" {
  63.         type master;
  64.         file "cmcc.cn.gprs";
  65.         allow-update{
  66.                 localhost;
  67.         };
  68.         also-notify{
  69.                 211.136.115.221;
  70.         };
  71. };
  72. zone "0.0.127.IN-ADDR.ARPA" {
  73.         type master;
  74.         file "named.local";
  75. };
复制代码



named.conf_slave

  1. options {
  2.         directory "/var/named";
  3. };
  4. // generated by named-bootconf.pl
  5. // secret must be the same as in /etc/rndc.conf
  6.         key "key"{
  7.         algorithm hmac-md5;
  8.         secret "0UU8e8+tP6j2jUX9XoU6NQ==";
  9. };
  10.         key "key_omccn."{
  11.         algorithm hmac-md5;
  12.         secret "O73cWwDdd2xKtA/7ttCNow==";
  13. };
  14. controls{
  15.         inet 127.0.0.1 allow{
  16.                 any;
  17.         }       keys{
  18.                 "key";
  19.         };
  20. };
  21. zone "." {
  22.         type hint;
  23.         file "named.ca";
  24. };
  25. zone "dns" {
  26.         type slave;
  27.         file "sec/dns";
  28.         masters{
  29.         211.136.115.220;
  30.         };
  31. };
  32. zone "mnc0007.mcc0460.gprs" {
  33.         type slave;
  34.         file "mnc0007.mcc0460.gprs";
  35.         masters{
  36.         211.136.115.220;
  37.         };
  38. };
  39. zone "mnc007.mcc460.gprs" {
  40.         type slave;
  41.         file "mnc007.mcc460.gprs";
  42.         masters{
  43.         211.136.115.220;
  44.         };
  45. };
  46. zone "mnc07.mcc460.gprs" {
  47.         type slave;
  48.         file "mnc07.mcc460.gprs";
  49.         masters{
  50.         211.136.115.220;
  51.         };
  52. };
  53. zone "cmcc.cn.gprs" {
  54.         type slave;
  55.         file "cmcc.cn.gprs";
  56.         masters{
  57.         211.136.115.220;
  58.         };
  59. };
  60. zone "0.0.127.IN-ADDR.ARPA" {
  61.         type master;
  62.         file "named.local";
  63. };
复制代码


/var/named/chroot/var/named文件夹权限:

  1. [root@primary named]# ll
  2. total 104
  3. -rw-rw-r--  1 named named  202 Jul 12 16:38 cmcc.cn.gprs
  4. drwxrwx---  2 named named 4096 Aug 26  2004 data
  5. -rw-rw-r--  1 named named  198 Aug 26  2004 localdomain.zone
  6. -rw-rw-r--  1 named named  195 Aug 26  2004 localhost.zone
  7. -rw-rw-r--  1 named named  202 Jul 12 16:38 mnc0007.mcc0460.gprs
  8. -rw-rw-r--  1 named named  230 Jul 12 16:38 mnc007.mcc460.gprs
  9. -rw-rw-r--  1 named named  202 Jul 12 16:38 mnc07.mcc460.gprs
  10. -rw-rw-r--  1 named named  415 Aug 26  2004 named.broadcast
  11. -rw-rw-r--  1 named named 2518 Aug 26  2004 named.ca
  12. -rw-rw-r--  1 named named  432 Aug 26  2004 named.ip6.local
  13. -rw-rw-r--  1 named named  188 Jul 12 15:08 named.local
  14. -rw-rw-r--  1 named named  416 Aug 26  2004 named.zero
  15. drwxrwx---  2 named named 4096 Jul 27  2004 slaves
复制代码

  1. [root@secondary named]# ll
  2. total 72
  3. drwxrwx---  2 named named 4096 Aug 26  2004 data
  4. -rw-r--r--  1 named named  198 Aug 26  2004 localdomain.zone
  5. -rw-r--r--  1 named named  195 Aug 26  2004 localhost.zone
  6. -rw-r--r--  1 named named  415 Aug 26  2004 named.broadcast
  7. -rw-r--r--  1 named named 2518 Aug 26  2004 named.ca
  8. -rw-r--r--  1 named named  432 Aug 26  2004 named.ip6.local
  9. -rw-r--r--  1 named named  433 Aug 26  2004 named.local
  10. -rw-r--r--  1 named named  416 Aug 26  2004 named.zero
  11. drwxrwx---  2 named named 4096 Jul 27  2004 slaves
复制代码


报错信息:

  1. Jul 12 18:19:28 primary named:  succeeded
  2. Jul 12 18:19:30 primary named[5164]: starting BIND 9.2.4 -u named -t /var/named/chroot
  3. Jul 12 18:19:30 primary named[5164]: using 2 CPUs
  4. Jul 12 18:19:30 primary named[5164]: loading configuration from '/etc/named.conf'
  5. Jul 12 18:19:30 primary named[5164]: listening on IPv4 interface lo, 127.0.0.1#53
  6. Jul 12 18:19:30 primary named[5164]: listening on IPv4 interface eth0, 211.136.115.220#53
  7. Jul 12 18:19:30 primary named[5164]: listening on IPv4 interface eth1, 172.24.11.88#53
  8. Jul 12 18:19:30 primary named[5164]: command channel listening on 127.0.0.1#953
  9. Jul 12 18:19:30 primary named[5164]: named.local:1: no TTL specified; using SOA MINTTL instead
  10. Jul 12 18:19:30 primary named[5164]: zone 0.0.127.IN-ADDR.ARPA/IN: loaded serial 2002022601
  11. Jul 12 18:19:30 primary named[5164]: zone dns/IN: loading master file dns: file not found
  12. Jul 12 18:19:30 primary named[5164]: zone cmcc.cn.gprs/IN: loaded serial 2002022701
  13. Jul 12 18:19:30 primary named[5164]: zone mnc0007.mcc0460.gprs/IN: loaded serial 2002022701
  14. Jul 12 18:19:30 primary named[5164]: zone mnc007.mcc460.gprs/IN: loaded serial 2007071202
  15. Jul 12 18:19:30 primary named[5164]: zone mnc07.mcc460.gprs/IN: loaded serial 2002022701
  16. Jul 12 18:19:30 primary named[5164]: zone cmcc.cn.gprs/IN: sending notifies (serial 2002022701)
  17. Jul 12 18:19:30 primary named: named startup succeeded
  18. Jul 12 18:19:31 primary named[5164]: running
  19. Jul 12 18:19:31 primary named[5164]: zone mnc0007.mcc0460.gprs/IN: sending notifies (serial 2002022701)
  20. Jul 12 18:19:31 primary named[5164]: zone mnc007.mcc460.gprs/IN: sending notifies (serial 2007071202)
  21. Jul 12 18:19:31 primary named[5164]: zone mnc07.mcc460.gprs/IN: sending notifies (serial 2002022701)
  22. Jul 12 18:19:31 primary named[5164]: client 211.136.115.221#32806: transfer of 'cmcc.cn.gprs/IN': AXFR started
  23. Jul 12 18:19:31 primary pam_timestamp_check: pam_timestamp: `/' owner UID != 0
  24. Jul 12 18:19:31 primary named[5164]: client 211.136.115.221#32807: transfer of 'mnc007.mcc460.gprs/IN': AXFR started
  25. Jul 12 18:19:31 primary named[5164]: client 211.136.115.221#32808: transfer of 'mnc0007.mcc0460.gprs/IN': AXFR started
  26. Jul 12 18:19:31 primary named[5164]: client 211.136.115.221#32809: transfer of 'mnc07.mcc460.gprs/IN': AXFR started
复制代码


  1. Jul 12 18:21:31 secondary named[5408]: starting BIND 9.2.4 -u named -t /var/named/chroot
  2. Jul 12 18:21:31 secondary named[5408]: using 2 CPUs
  3. Jul 12 18:21:31 secondary named[5408]: loading configuration from '/etc/named.conf'
  4. Jul 12 18:21:31 secondary named[5408]: listening on IPv4 interface lo, 127.0.0.1#53
  5. Jul 12 18:21:31 secondary named[5408]: listening on IPv4 interface eth0, 211.136.115.221#53
  6. Jul 12 18:21:31 secondary named[5408]: listening on IPv4 interface eth1, 172.24.11.99#53
  7. Jul 12 18:21:31 secondary named[5408]: command channel listening on 127.0.0.1#953
  8. Jul 12 18:21:31 secondary named[5408]: zone 0.0.127.IN-ADDR.ARPA/IN: loaded serial 1997022700
  9. Jul 12 18:21:31 secondary named[5408]: running
  10. Jul 12 18:21:31 secondary named[5408]: dumping master file: tmp-XXXXDfYand: open: permission denied
  11. Jul 12 18:21:31 secondary named[5408]: transfer of 'cmcc.cn.gprs/IN' from 211.136.115.220#53: failed while receiving responses: permission denied
  12. Jul 12 18:21:31 secondary named[5408]: transfer of 'cmcc.cn.gprs/IN' from 211.136.115.220#53: end of transfer
  13. Jul 12 18:21:31 secondary named: named startup succeeded
  14. Jul 12 18:21:32 secondary named[5408]: zone dns/IN: refresh: unexpected rcode (SERVFAIL) from master 211.136.115.220#53
  15. Jul 12 18:21:32 secondary named[5408]: dumping master file: tmp-XXXXNgqmoC: open: permission denied
  16. Jul 12 18:21:32 secondary named[5408]: transfer of 'mnc0007.mcc0460.gprs/IN' from 211.136.115.220#53: failed while receiving responses: permission denied
  17. Jul 12 18:21:32 secondary named[5408]: transfer of 'mnc0007.mcc0460.gprs/IN' from 211.136.115.220#53: end of transfer
  18. Jul 12 18:21:32 secondary named[5408]: dumping master file: tmp-XXXX912zp1: open: permission denied
  19. Jul 12 18:21:32 secondary named[5408]: transfer of 'mnc007.mcc460.gprs/IN' from 211.136.115.220#53: failed while receiving responses: permission denied
  20. Jul 12 18:21:32 secondary named[5408]: transfer of 'mnc007.mcc460.gprs/IN' from 211.136.115.220#53: end of transfer
  21. Jul 12 18:21:32 secondary named[5408]: dumping master file: tmp-XXXXxitSqq: open: permission denied
  22. Jul 12 18:21:32 secondary named[5408]: transfer of 'mnc07.mcc460.gprs/IN' from 211.136.115.220#53: failed while receiving responses: permission denied
  23. Jul 12 18:21:32 secondary named[5408]: transfer of 'mnc07.mcc460.gprs/IN' from 211.136.115.220#53: end of transfer
复制代码


我已经使用过chown -R named.named /var/named/这条命令,不过执行过程中有很多报错,集中在/var/named/chroot/proc/这个文件夹的permission denied
甚至已经关掉SElinux,slave还是无法读取master的文件,不知道该如何解决?

谢谢各位!

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2007-07-13 00:33 |只看该作者
先關了 selinux 再跑 chown 吧。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP