简体   繁体   中英

permission denied when using `sudo grep syslog` inside perl script (cgi-bin)

i have perl script inside my cgi-bin folder, what i want is grep syslog using sudo grep (because it is root), but i got this message

We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

so, any solution to solve this problem ??

您应该使用NOPASSWD将apache / nginx用户添加到sudoers以便工作(不是很值得推荐)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM