except OSError:
pass
- os.mkdir(dns_dir, 0770)
- # chmod needed to cope with umask
- os.chmod(dns_dir, 0770)
-
- if paths.bind_gid is not None:
- try:
- os.chown(dns_dir, -1, paths.bind_gid)
- except OSError:
- message("Failed to chown %s to bind gid %u" % (dns_dir, paths.bind_gid))
+ os.mkdir(dns_dir, 0775)
setup_file(setup_path("provision.zone"), paths.dns, {
"HOSTNAME": hostname,
"HOSTIP6_HOST_LINE": hostip6_host_line,
})
+ if paths.bind_gid is not None:
+ try:
+ os.chown(dns_dir, -1, paths.bind_gid)
+ os.chown(paths.dns, -1, paths.bind_gid)
+ # chmod needed to cope with umask
+ os.chmod(dns_dir, 0775)
+ os.chmod(paths.dns, 0664)
+ except OSError:
+ message("Failed to chown %s to bind gid %u" % (dns_dir, paths.bind_gid))
+
def create_named_conf(paths, setup_path, realm, dnsdomain,
private_dir):