Can't copy files via SSH


#1

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?


#2

Have you checked to make sure that the companysite.tld directory is empty? It sounds like there’s already some kind of special file in the companysite.tld directory. cd to the companysite.tld directory and do an “ls -lF”.

What are [color=#CC0000]50DISK50[/color], [color=#CC0000]3DOM50[/color], and [color=#CC0000]1IP1DOM50[/color]?
They’re Dreamhost coupons!


#3

The …/ makes me think where are you located (maybe you forgot a cd)
I suggest
to create a empty dir with fully host now… say companysite.com/
and then move (cd) to the directory of companysite.dreamhosters.com/

do a cp * -rv …/companysite.com

Remember if you do this from ~ AKA home you may get the permission denied as …/companysite.com will attempt to be created on a level where you had no permission to write.

Hope you had better luck this time.

use VIC3M to get 50USD discount on all plans +10% on storage and bandwith, VICM3 to get the maximum disscount on sign up.