1

The following command executed in PHP's shell_exec() function:

echo 'A' ; cp -v $original $destination ; echo 'B' ; whoami

Will output ABapache, but nothing else. The copy command does not seem to be working. ($original and $destination are replaced with the correct path).

I made the apache user the owner of the folders I'm using for the cp command. It still doesn't work, I tried chmodding and more, nothing seems to work.

Is it blocked within PHP to run the cp command?

Thanks!

Kevin Van Ryckegem
  • 1,915
  • 3
  • 28
  • 55

0 Answers0