Reputation: 2153
I have the following directories:
/var/www/temp
/var/www/users (S3 mount)
the user which the following php is run on is www-data
:
mkdir("temp/id247439757");
addSomeFilesInTheAboveDirectory();
shell_exec("temp/id247439757 users/id247439757");
the problem is that it's not moving the directory from temp/ to users/! All the files stay in the temp directory.
I think the user that executes shell_exec is www-data as well! how can I fix this? Please note that this problem cannot be addressed to the fact that it's a mounted directory as, if I directory do mkdir("users/id247439757") it does work.
Upvotes: 1
Views: 1868
Reputation: 42885
You forgot the "mv" command inside the shell_exec call:
shell_exec("mv temp/id247439757 users/id247439757");
Upvotes: 1