Can't copy files via SSH
Posted by: benjudy
Posted on: 2008-01-28 21:27:00
I'm not an SSH / command line expert kinda guy... hopefully my ignorance doesn't show too badly here!
I recently built a business site for a client. His old site was hosted with another service. I set up the new site on DreamHost using the setup domain: companysite.dreamhosters.com.
(Obviously companysite.com is not the actual domain, just an alias for the purposes of this post.)
I was thinking that once I was done with development, implementing the new site would be a snap. Just three steps:
1. Update the DNS on the domain name to DreamHost's
2. Add the domain companysite.com via the DreamHost panel ("fully hosted")
3. Copy the files from the companysite.dreamhosters.com folder on the server into the companysite.com folder.
Well, steps one and two went off just fine. Then comes step 3. I didn't want to upload all those files via FTP. Lucky thing I found SSH and PuTTY.
So I SSH in to the server, navigate to the companysite.dreamhosters.com directory, and try this:
cp index.php ../companysite.com
Which, near as I can tell, *should* copy the file over into the new directory.
But I get this:
cannot create regular file '../companysite.com/index.php': Permission denied
Any idea why?