I created a DHCP server on ubuntu 18:04 using isc-dhcp-server that normally works. I want to run a script located in /user/sbin but get error of permission denied with exit status 32512. Probably it's a permission error but I'm not expert. This is my dhcp server located in:
/etc/dhcp/dhcpd.conf
default-lease-time 86400;
max-lease-time 7200;
ignore client-updates;
authoritative;
use-host-decl-names on;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.101 192.168.1.150;
option subnet-mask 255.255.255.0;
option routers 192.168.1.3;
option domain-name-servers 192.168.1.100;
ddns-rev-domainname "in-addr.arpa.";
}
on commit {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
log(concat("Commit: IP: ", ClientIP, " Mac: ", ClientMac));
execute("/usr/sbin/update_DB.sh", "commit", ClientIP, ClientMac);
}
/var/log/syslog
Apr 8 14:28:05 dhcp dhcpd[1223]: Commit: IP: 192.168.1.102 Mac: XXX
Apr 8 14:28:05 dhcp dhcpd[1223]: execute_statement argv[0] = /usr/sbin/update_DB.sh
Apr 8 14:28:05 dhcp dhcpd[1223]: execute_statement argv[1] = commit
Apr 8 14:28:05 dhcp dhcpd[1223]: execute_statement argv[2] = 192.168.1.102
Apr 8 14:28:05 dhcp dhcpd[1223]: execute_statement argv[3] = XXX
Apr 8 14:28:05 dhcp dhcpd[1227]: Unable to execute /usr/sbin/update_DB.sh: Permission denied
Apr 8 14:28:05 dhcp dhcpd[1223]: execute: /usr/sbin/update_DB.sh exit status 32512
anyone knows how to solve it, please? Thanks!