Akkadius / glass-isc-dhcp

Glass - ISC DHCP Server Interface
MIT License
686 stars 143 forks source link

Saving Configuration (Permission Denied) #54

Closed SeaLife closed 4 years ago

SeaLife commented 4 years ago

Hey,

im getting a weird error on saving the configuration.

Internet Systems Consortium DHCP Server 4.3.5
Copyright 2004-2016 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Can't open ./syntax_verify_config: Permission denied If you think you have received this message due to a bug rather than a configuration issue please read the section on submitting bugs on either our web page at www.isc.org or in the README file before submitting a bug
These pages explain the proper process and the information we find helpful for debugging.. exiting.

I tried the following:

chmod +x /opt
chmod +x /opt/glass-isc-dhcp

I also tried replacing the relative path in routes/dhcp_config_save with the absolute one, still getting permission denied.

Using cat /opt/glass-isc-dhcp/syntax_verify_config as a non-root User its working fine, dont know why i get a permission denied there...

OS Infos:

Ubuntu 18.04.3 LTS
isc-dhcp-server 4.3.5
xMetro commented 4 years ago

We had the same issue just ran: sed -i '/\/etc\/dhcp\/\*\*/a\ \ \/var\/lib\/dhcp\/\*\* lrw,' /etc/apparmor.d/usr.sbin.dhcpd sed -i '/\/etc\/dhcp\/\*\*/a\ \ \/opt\/glass-isc-dhcp\/\*\* lrw,' /etc/apparmor.d/usr.sbin.dhcpd service apparmor restart

SeaLife commented 4 years ago

These SED commands worked like a charm.

Probably this cant be fixed by the software so i consider this as resolved, maybe update the documentation about this. :)

Thanks