After I installed Plesk 7.5.4 on Redhat Linux Enterprise AS 4, I could not run named service (BIND version 9.2.4) using command "service named start" and I got the following errors :
- could not open entropy source /dev/random: permission denied
- couldn't open pid file '/var/run/named/named.pid': Permission denied
But when I tried to run named using following command every thing was ok :
# named -u named -c /etc/named.conf -t /var/named/run-root
I think the cause of first problem is that named wants to use /var/named/run-root/dev/random because the root directory for named is /var/named/run-root and it does not use random which is located in /dev. To solve this problem you should make dev/random in named's root directory. You can do this as described in this article : /dev/random fix for bind
And the second problem : I could not find any solution for this problem, I checked permission of all related directories such as /var/named/run-root/var/run/named, it's owner and group is named and it has write permission too, so I don't know why it tells me permission denied.
To solve the second problem I decided to write simple shell script to run named instead of using /etc/rc.d/init.d/named. This script is so simple and you can download it here : (simplenamed.sh)
I'll be very thankful if somebody suggests a better solution !