Can't open lease database /dev/shm/dhcpd/dhcpd.leases: Permission denied --
dhcp1 at thehobsons.co.uk
Tue Apr 3 07:10:31 UTC 2012
>i stopped the dhcpd service autostart,and add the following line to
> cp /var/lib/dhcpd/dhcpd.leases /tmp/dhcpd.leases
> /sbin/dhcpd -lf /tmp/dhcpd.leases
>then,i reboot system,but dhcpd didnt start.
>i found a messages in system log files:
> Can't open lease database /tmp/dhcpd/dhcpd.leases: Permission denied --
>but if i run the two lines by manual,it can work.
># cp /var/lib/dhcpd/dhcpd.leases /tmp/dhcpd.leases
># /sbin/dhcpd -lf /tmp/dhcpd.leases
Have you looked at the permissions of the source and copied files ?
That might just give you a clue ! You might want to add the "-p" flag
to cp to preserve permissions.
Also, there are inconsistencies :
/tmp/dhcpd/dhcpd.leases is different to /tmp/dhcpd.leases and both
are different to /dev/shm/dhcpd/dhcpd.leases - is that just a copy &
paste error while you've been experimenting ?
I trust you've also modified your scripts to copy the leases file
back again before stopping the daemon ? Even so, putting the leases
file somewhere volatile (/dev/shm/dhcpd/dhcpd.leases) is very
dangerous since if you lose the leases file your server has no memory
of promises it made in the past and that can lead to a world of hurt.
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the dhcp-users