The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General Discussion' started by listenmirndt, Sep 7, 2007.

  1. listenmirndt

    listenmirndt Member

    Joined:
    Jul 14, 2004
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    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
     
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    If you do a copy in shell, don't forget to change the ownerships to the new account username.
     
Loading...

Share This Page