On my old VPS I was using the following code to copy the files and directories within a directory to a new directory that was created after the user submitted their form.
I guess you should check user(group)rights. You should consider chmod for example, depending on how you run (su?)PHP. You could possibly also choose to modify your php configuration.