I am running a PHP script on my Apache server and from the script I need to copy some files (to run a Bash script that copies files). I can copy to a directory
/tmp with no problems, but when I want to copy to
/tmp/foo then I get this error:
cp: cannot create regular file '/tmp/foo/file.txt': Permission denied
even though the permissions for the directory
/tmp/foo are set to the same value.
Do you know what is the problem?