cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: FTP CWD problem introduced with 7.11.x

From: Ridley, John <john.ridley_at_thomson.com>
Date: Wed, 26 May 2004 10:19:44 -0400

I'm sorry, I was away for a while and unable to respond.

On Fri, 23 Apr 2004, Ridley, John wrote:
> This does not work for me, because I do not have access to get into the
> directory /foo. As soon as that is tried, it fails and that's the end.

Daniel Stenberg [daniel-curl_at_haxx.se] wrote:
>But if you cannot CWD into foo, how can the system allow you to
>CWD into foo/bar?

I dunno, but that's the case with the server I need to work with. I'm not
allowed to CD into the parent (in fact, attempting to do so will trigger an
alarm) but I can get into my own directory. I know this doesn't work under
Linux (chmod 700 the parent, and you can't get into the child even if it's
777) but with the server I'm logging into, they were able to set it up.

Here's a sample from a session:
220-Solaris FTP ready...
220-StAck Program
220 Drake Enterprises, Ltd
Name (stackswitch.dnet.net:jrr): ****
331 User name okay, need password.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd t:/ef/dd/dcs3
250 Directory changed to /t:/ef/dd/dcs3
ftp> cd t:/ef/dd
550 /t:/ef/dd: Permission denied.
ftp>

>Can you describe for us how this situation happens? Perhaps we could work
out
>some heuristics to attempt the full-path CWD in case the single-part CWD
>fails...

Well, you can look for a 550, and if that happens, try the whole path before
giving up.
This method would of course have to be disabled if the user had specified
--ftp-create-dirs.

This still would cause me problems, since if I try to log into a directory
that I do not have permission to, a counter increments in my account. Once
it hits a certain value (something less than 10, I think) my account is
disabled and I must call in and ask for it to be reset.

I am probably not going to be able to use curl anyway, since it appears that
curl doesn't allow FTP access via a socks proxy (as soon as you say "socks"
it says "http" even if the url says "ftp")
Received on 2004-05-26