我想用这个PHP命令覆盖我的“/etc/网络/接口”文件
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');我可以在我的"/var/ log /apache2/error.log“中看到日志: sh: 1:无法创建/etc/网络/接口:权限被拒绝
我如何允许PHP覆盖这个文件?
发布于 2018-08-27 09:50:11
使用二进制包装器(带有suid位)的解决方案.
您可以从这个Solution using a binary wrapper获得帮助。
https://stackoverflow.com/questions/52036213
复制相似问题