Leases file question

Mark Krenz mark.krenz at cookmedical.com
Wed Aug 18 19:14:41 UTC 2010


As an alternative to changing the permissions on the live file, if you 
don't need up to the second accuracy, you could just make a cronjob that 
runs every minute as root and copies the file someplace friendlier and 
makes it owned by apache.

If you do need up to the second accuracy, you could write a script that 
could run and check the file every second or something.  Wouldn't be too 
hard.

On 08/18/2010 03:02 PM, Gene LeDuc wrote:
> I have a cgi script that needs to read the dhcpd.leases file.  Apache
> (and the cgi script) run as user apache, while dhcpd is running as root.
>    I changed the ownership of the leases file to root.apache and set
> group read permissions so the script can read it.  It seems that when
> dhcpd does housekeeping, the leases file ends up root.root and my script
> can't read it.  This is v3.0.5 running on RHEL 5.
>
> Is there a way to do any of the following:
> 1. Get dhcpd to maintain the group ownership and permissions
> 2. Get dhcpd to signal that it is has created a new leases file so I can
> change the ownership and permissions back to what I need
> 3. Have dhcpd do the leases housekeeping on a predictable schedule
>
> Thanks,
> Gene
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>    


-- 
Mark S. Krenz
System Administrator
Cook Incorporated
mark.krenz at cookmedical.com
phone: (812)339-2235 ext.4224




More information about the dhcp-users mailing list