Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

August 29, 2007

Why Can’t I Change the FTP Remote Directory to C:\Temp?

What’s wrong with this line of code?

success = ftp2.ChangeRemoteDir("c:\temp")

Answer:
Although the directory "c:\temp" may exist on your FTP server, it may not be accessible from your FTP user account.
An FTP server manages it’s own user accounts. Each user account has it’s own home directory, which can be "rooted" anywhere. For example, your FTP server administrator may have placed user account "Matt" at:

c:\myFtpServer\user_accounts\Matt

When "Matt" logs in, he is automatically placed in that directory. Setting the remote directory to "\" is the same as setting it to "c:\myFtpServer\user_accounts\Matt". Also, Matt is not allowed to access directories anywhere else — he is only allowed access
to files and directories beneath his root. Therefore, "C:\temp" does not exist from within the context of the FTP account.

Note: You would never use drive letters with FTP remote directory paths…


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.