title: PHP webpage doesn't launch unix command even after updated sudoers
body: <p>Basically I am trying to restart a service from a php web page.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt;?php
  exec ('/usr/bin/sudo /etc/init.d/portmap restart');
  ?&gt;
  </code></pre>
  
  <p>But, in <code>/var/log/httpd/error_log</code>, I get </p>
  
  <blockquote>
    <p>unable to change to sudoers gid: Operation not permitted</p>
  </blockquote>
  
  <p>and in /var/log/messages, I get</p>
  
  <blockquote>
    <p>Sep 22 15:01:56 ri kernel: audit(1222063316.536:777): avc:  denied  { getattr } for  pid=4851 comm="sh" name="var" dev=dm-0 ino=114241 scontext=root:system_r:httpd_sys_script_t tcontext=system_u:object_r:var_t tclass=dir<br>
    Sep 22 15:01:56 ri kernel: audit(1222063316.549:778): avc:  denied  { setrlimit } for  pid=4851 comm="sudo" scontext=root:system_r:httpd_sys_script_t tcontext=root:system_r:httpd_sys_script_t tclass=process<br>
    Sep 22 15:01:56 ri kernel: audit(1222063316.565:779): avc:  denied  { read } for  pid=4851 comm="sudo" name="shadow" dev=dm-0 ino=379669 scontext=root:system_r:httpd_sys_script_t tcontext=system_u:object_r:shadow_t tclass=file<br>
    Sep 22 15:01:56 ri kernel: audit(1222063316.568:780): avc:  denied  { read } for  pid=4851 comm="sudo" name="shadow" dev=dm-0 ino=379669 scontext=root:system_r:httpd_sys_script_t tcontext=system_u:object_r:shadow_t tclass=file<br>
    Sep 22 15:01:56 ri kernel: audit(1222063316.571:781): avc:  denied  { setgid } for  pid=4851 comm="sudo" capability=6 scontext=root:system_r:httpd_sys_script_t tcontext=root:system_r:httpd_sys_script_t tclass=capability<br>
    Sep 22 15:01:56 ri kernel: audit(1222063316.574:782): avc:  denied  { setuid } for  pid=4851 comm="sudo" capability=7 scontext=root:system_r:httpd_sys_script_t tcontext=root:system_r:httpd_sys_script_t tclass=capability<br>
    Sep 22 15:01:56 ri kernel: audit(1222063316.577:783): avc:  denied  { setgid } for  pid=4851 comm="sudo" capability=6 scontext=root:system_r:httpd_sys_script_t tcontext=root:system_r:httpd_sys_script_t tclass=capability</p>
  </blockquote>
  
  <p>In my visudo, I added those lines</p>
  
  <blockquote>
    <p>User_Alias      WWW=apache  </p>
    
    <p>WWW ALL=(ALL) NOPASSWD:ALL</p>
  </blockquote>
  
  <p>Can you please help me ? Am I doing something wrong ?</p>
  
  <p>Thanks for your help,</p>
  
  <p>tiBoun</p>