I want to overwrite my "/etc/network/interfaces" file with this PHP command
exec('sudo echo -e "# Include files from /etc/network/interfaces.d:\nsource-directory /etc/network/interfaces.dauto eth0\n\nauto eth0\niface eth0 inet static\naddress \nnetmask \ngateway \n\n" > /etc/network/interfaces');
I can see in my "/var/log/apache2/error.log" the log : sh: 1: cannot create /etc/network/interfaces: Permission denied
How can I allow PHP to overwrite this file?