douhe6181 2014-09-23 11:30
浏览 741

sudo:PERM_ROOT:setresuid(0,-1,-1):不允许操作

So the problem is that the error comes up in apache.err.

I CAN execute as the user in the shell.

root@ubuntu:~# su www-data
www-data@ubuntu:/root$ sudo /usr/local/bin/metronomectl restart
Stopped
Started
www-data@ubuntu:/root$

but when i try the same command through php

exec('sudo /usr/local/bin/metronomectl restart');

i get the error

sudo: PERM_ROOT: setresuid(0, -1, -1): Operation not permitted

user www-data IS in sudoers.

I'm at the end of my wits here... Any help is appreciated.

PS. Please ask if you need any extra info.

edit:

root@ubuntu:~# uname -a
Linux ubuntu 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:~#

sudoers line:

www-data ALL= NOPASSWD: /usr/local/bin/metronomectl
  • 写回答

3条回答

  • dsdxlibt98300 2014-09-23 12:19
    关注

    Fixed by disabling mpm_itk module in apache.

    评论

报告相同问题?

悬赏问题

  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥15 绘制多分类任务的roc曲线时只画出了一类的roc,其它的auc显示为nan
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?