php不能实施shell脚本中的sed命令-

WBOY
Release: 2016-06-13 10:34:24
Original
1483 people have browsed it

php不能执行shell脚本中的sed命令---急
sed -i '/^BOOTPROTO/d' 文件路径  
sed -i '/^DEVICE/i\\BOOTPROTO=none' 文件路径

------解决方案--------------------
检查exec有没有执行系统命令的权限
检查Apache用户有没有执行sed命令的权限
------解决方案--------------------
把代码:
sed -i '/^BOOTPROTO/d' 文件路径
sed -i '/^DEVICE/i\\BOOTPROTO=none' 文件路径
写到shell.sh脚本里。
然后ls查看该脚本权限不就OK了?要执行当然要有XXX权限,直接单行执行干吗呢?
------解决方案--------------------
你的sed命令时不是只有root权限才能执行?
------解决方案--------------------

探讨

是得呀 怎么做呢
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!