curl-library
Re: FTP: Automatic cd to user directory
Date: Mon, 4 Nov 2002 10:06:34 -0600 (CST)
Wow. I hadn't even heard of this double-slash feature. Thank you very much. Now I've to try if it works for me.
Bye,
Alex
Daniel Stenberg <daniel_at_haxx.se> wrote:On Fri, 1 Nov 2002, Alejandro Escalante wrote:
> I'd like to pose a question for experienced FTP users, though, not directly
> related to libcurl.
>
> Seems like Microsoft FTP servers does an automatic change of directory at
> logon to a directory below the root that has the same name as the login
> name, if this directory exists. I'd like to know of this is the case on all
> FTP servers, and if this behavior can be disabled, leaving the user at the
> root of the hierarchy.
>
> This has caused me some trouble with a project I've been developing with
> curl, since URLs are expressed in the form ftp://server/directory, if the
> server cd's me to another directory depending the user, this is is a
> problem.
This is very common indeed. I'd so far to say that almost every single FTP
server out there will behave like this.
Of course, the FTP URLs you use are normally adjusted to this (as they login
anonymously) and if you truly want a file relative the actual file system
root, you specify the file like:
With double slashes, as this would then refer to '/directory' and not
'directory' within the user's home dir.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com --------------------------------- Do You Yahoo!? Yahoo! Net: La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. ------------------------------------------------------- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.comReceived on 2002-11-04