0

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?

hakre
  • 193,403
  • 52
  • 435
  • 836
Logan Best
  • 501
  • 3
  • 7
  • 21

1 Answers1

3

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?

Community
  • 1
  • 1
Zorb
  • 726
  • 11
  • 24