Can't copy files via SSH


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:

(Obviously 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 via the DreamHost panel (“fully hosted”)
  3. Copy the files from the folder on the server into the 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 directory, and try this:

cp index.php …/

Which, near as I can tell, should copy the file over into the new directory.

But I get this:

cannot create regular file ‘…/’: Permission denied

Any idea why?


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!


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
and then move (cd) to the directory of

do a cp * -rv …/

Remember if you do this from ~ AKA home you may get the permission denied as …/ 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.