Subject: bug, implementation issue, or protocol?

From: Dan Foster <[email-masked]>
Date: Fri, 7 Mar 1997 16:44:11 -0500 (EST)

Ok, got a question for y'all because I can't decide if this is a bug, an
implementation issue, or a protocol issue:

user on box A is ftp'ing a file from box A to box B.

ftp> put /etc/services

It should get box A's /etc/services, and deposit on box B as 'services'
in the current directory there, right? Or does the fully qualified path
indicate the files goes into /etc/services on box B?

This is a linux server (kernel 2.0.27, libc 5.3.12) running wu-ftpd 2.4.2
beta 13.

What happens is that there is a STOR /etc/services on box B, which fails
(naturally), which isn't quite what was wanted. ;-)

I don't know if the user command above (put /etc/services) is supposed to
put file in /etc/services on box B *OR* in current dir as 'services' on box B.

If it's the former behavior, then chalk it up to me for not understanding.
If it's the latter, then I'd debug the path info being passed because I also
saw a mention of 553 can't get cwdir directory in a similar test, and
produce a patch as well as filing an official bug report.

Nothing funky for server setup - account isn't chrooted or anything.

If user does this:

ftp> lcd /etc
ftp> put services

Then it deposits file as 'services' in curr. dir. on box B, as expected.

-Dan Foster
Internet: [email-masked]

---

From: Alain Magloire <[email-masked]>
Date: Fri, 7 Mar 1997 17:16:22 -0500 (EST)

Bonjour Mr Dan Foster
> indicate the files goes into /etc/services on box B?

this is more a client issue, then a Protocol issue

put/get etc .. doesn't exist as directives, they are 'std' command
supplied by the client

for example if you use ncftp ftp client
and do

ncftp> put /etc/services

this will be map to:
PORT a,b,c,d,p1,p2
STOR services

ncftp will chop every thing 'til the last '/'

if you try the same thing on a Sun machine with the system ftp

ftp> put /etc/services

you'll have:
PORT a,b,c,d,p1,p2
STOR /etc/services

and the usual answer
553 /etc/services: Permission denied.

put/get are nice commands because you can specify the name of the
remote file so:

ftp> put /etc/services /tmp/boo_c_est_moi

the same for get

-- 
au revoir, alain

---

From: Bob Luckin <[email-masked]>
Date: Fri, 7 Mar 97 17:04:12 CST

Dan Foster said :-
> put file in /etc/services on box B *OR* in current dir as 'services' on box B.

This is nothing to do with the ftpd server; it sees a "STOR <filename>"
command and tries to carry it out.

The problem is that FTP clients differ; some clients will send a
"STOR /etc/services" command in the situation you describe, while others
may strip off the directory portion and just send "STOR services".

So the difference is down to the client end of the transaction, which is
not something the server can control.

Cheers, Bob
-- 
Bob Luckin      [email-masked]      "A man, a plan, a canal, Suez !"

---

From: Dan Foster <[email-masked]>
Date: Fri, 7 Mar 1997 18:19:28 -0500 (EST)

Hot Diggety! Bob Luckin was rumored to have said...
> not something the server can control.

Makes perfect sense. Thanks to Alain Magloire (and you) for pointing out the
errors of my ways. I have repented. ;-)

-Dan Foster