?

Log in

No account? Create an account
Confusing error messages. - I know it's wonky and I don't care [entries|archive|friends|userinfo]
Kake

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| Randomness Guide to London | Open Guide to Cambridge | Snake Soup | KakeFlickr ]

Confusing error messages. [Nov. 9th, 2006|02:57 pm]
Kake
[Tags|]

kaketop:~/tmp kake$ scp shirataki-noodles-with-aubergine.jpg the.earth.li:public_html/images/2006-11-04/
Password:
scp: public_html/images/2006-11-04/: Is a directory


Actually, the problem is that it isn't a directory. As in, it doesn't exist.

(I forgot part of the path. And yeah, I know that what it's actually trying to say is that it thought I was trying to copy the local file to a remote file named 2006-11-04, and I'm not allowed to do that because the remote file is in fact a directory.)
LinkReply

Comments:
[User Picture]From: rjw1
2006-11-09 03:07 pm (UTC)
well the slash at the end is telling it that it wants to be a directory
(Reply) (Thread)
[User Picture]From: nou
2006-11-09 03:15 pm (UTC)
That's what I meant by the bit in brackets.

I always put the slash on the end on purpose, to catch mistakes like this.
(Reply) (Parent) (Thread)
[User Picture]From: imc
2006-11-09 03:18 pm (UTC)
I'd be tempted to open a bug report about that.

Meanwhile, on Solaris it silently ignores the trailing slash and makes a regular file called 2006-11-04.
(Reply) (Thread)
[User Picture]From: ewx
2006-11-09 04:05 pm (UTC)

From an strace:

open("foo/", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = -1 EISDIR (Is a directory)

...delphic at the very least. But we can hardly blame scp for accurately reporting the error it got.

(Reply) (Thread)
[User Picture]From: imc
2006-11-09 05:17 pm (UTC)
What was it that led scp to try opening "foo/" as a regular file though? The local cp command doesn't do that.
(Reply) (Parent) (Thread)
[User Picture]From: ewx
2006-11-09 05:19 pm (UTC)
Well, scp isn't cp.
(Reply) (Parent) (Thread)
[User Picture]From: imc
2006-11-09 07:39 pm (UTC)
It was what's known as an analogy.

Mind you, scp is cp if the source and destination are both local.
(Reply) (Parent) (Thread)