Reputation: 501
I've been able to get php user www-data to run git commands via visudo but I keep getting Permission Denied when I want it to run
ln -sf target link
What should I put in visudo in order for this to run fine?
Upvotes: 0
Views: 1309
Reputation: 726
check if both "target" and "link" are www-data acessible, adding privileges in sudores file using visudo allow you to only run commands like
sudo powerfullCommand params
and not
powerfullCommand params
to dismiss password request on certain command try
some_user ALL = NOPASSWD: /bin/ln
Hope this can help
take a look to a similar post:
How to call shell script from php that requires SUDO?
Upvotes: 3