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

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.

    评论

报告相同问题?

悬赏问题

  • ¥15 gwas 分析-数据质控之过滤稀有突变中出现的问题
  • ¥15 没有注册类 (异常来自 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
  • ¥15 知识蒸馏实战博客问题
  • ¥15 用PLC设计纸袋糊底机送料系统
  • ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
  • ¥15 用C语言输入方程怎么
  • ¥15 网站显示不安全连接问题
  • ¥15 51单片机显示器问题
  • ¥20 关于#qt#的问题:Qt代码的移植问题
  • ¥50 求图像处理的matlab方案