I am trying to get sudo working inside a particular directory. I can get the correct output when I use:
echo (shell_exec("sudo -V"));
(displays the version number) but other commands, especially shell commands, do not seem to be working with sudo (I can get shell commands like cp to work inside this directory on their own, from shell_exec()).
I need to be able to use sudo to read and write to files in a protected directory that has a symlink in the one I am working in. But I can't even get sudo to execute shell commands like cp inside my own (fully permission-enabled) directory. Anybody got any tips?