Copying files from 1 site to another on same server

Hi guys

Can you let me know how I could make the followng

  1. I have a demo which I create for each customer. All the files are the same for each demo.

  2. I have a PHP script which creates a new hosting account with these files in

  3. I then want to move these files onto my demo site in a sub folder

Steps 1 and 2 work fine. But in step 3 i use rename and I get permission denied error. I have been told I cannot move files from one website to another even if they are on the same server? Is there any other way I can achieve what I am trying to do?


If the entire website is identical, what is the purpose of the subfolder / copying the files? Why not send each person to the same place?

The content is different as data is pulled from the DB. Although I suppose I could start a session which loads up a different DB?

Something along those lines would seem a cleaner solution