I'm new to Linux and PHP world. We have a web panel that is developed in PHP. User should be able to change the IP address of the server using this panel. At the moment we have added some rules to SELinux so we can run shell commands and update ifcfg-enp1s0 file. The problems is that wen we edit this file in our web application , we can see that the changes has written to the file but the don't apply to the Linux. Even after restarting network service the IP is not changed. After restarting the server the Centos crashes and does not work anymore.Updateservice network restart command executes successfully in command line but the IP is still the old IP.
Overwriting ifcfg-enp1s0 file corrupts Linux Centos 7
linux;centos;ip;network interface