I need to execute the exec command from php to write to my vhosts.conf . I have one add_vhost.sh file:
cat /home/www/test/conf/vhosts.conf >> /etc/httpd/conf.d/vhosts.conf
this is php script:
exec($path_to_add_vhost_sh_file, $output);
I want to set a password requirement for user peter to execute this file, so I did the following in my /etc/sudoers
peter ALL=(ALL)NOPASSWD:/home/www/test/conf/add_vhost.sh , but it still does not work, even in the console. fedora 15
source share