scp No such file or directory

Posted by Joe on Super User See other posts from Super User or by Joe
Published on 2012-06-04T20:31:07Z Indexed on 2013/07/02 5:08 UTC
Read the original article Hit count: 443

I've a confusing question for which superuser doesn't seem to have a good answer, and neither google.

I'm trying to scp a file from a remote server to my local machine. The command is this

scp user@server:/path/to/source/file.gz /path/to/destination

The error I get is:

scp: /path/to/source/file.gz: No such file or directory

user is my username on the server. The command syntax appears fine to me. ssh works fine and I can cd to the file and it doesn't seem to be an access control issue?

Thanks;


Edit:

Thank you John. I spotted the issue.

ls returned this:

-r--r--r-- 1 nobody users 168967171 Mar 10  2009 /path/to/source/file.gz

So, the file was on a read-only file system and user is able to read it but not scp. I just copied the file to a different directory and chown it and worked fine. It would be good if someone can explain why this is the case though.

© Super User or respective owner

Related posts about filesystems

Related posts about file-transfer