Copy files from one domain to another (on the same server)

listenmirndt

Member
Jul 14, 2004
23
0
151
Hi all, I am trying to copy files from one domain to another on my client's Cpanel server (with PHP).

But I am running into permissions problems. I can get it to work if I bash chmod the domain (to be copied to) to 777, but otherwise, I can't get it to work.

What kind of permissions/setup for the main account (which host's the files) - Or how, can I accomplish this sort of thing?

Thanks
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
How are you trying to copy the files? If you do not have access to server, you need to download them on your machine and upload under the second domain.

If you have access to the server as root, you can simply execute the cp command to copy the files.

cp -aRf /home/username/source /home/username1/destination