1

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.

3
  • ? maybe you forgot to specify an actual command to be executed? like 'mv' ? Commented Oct 24, 2012 at 12:28
  • ...... i'm dumb. 2 characters are just so small to see. Commented Oct 24, 2012 at 12:29
  • LOL, I expected that to be a typo in the stripped down example! Commented Oct 24, 2012 at 12:29

1 Answer 1

1

You forgot the "mv" command inside the shell_exec call:

shell_exec("mv temp/id247439757 users/id247439757");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.