Archived Forum Post

Index of archived forum posts


FTP on iOS - correct password not correctly transferred?

Oct 04 '13 at 11:09

Hi, we are currently evaluating the iOS lib, focussing on using FTP.

Using the iOS lib in Xcode for FTP, the code connects, but the passwords are always rejected by the servers (tried 2 servers). Works from console of course (Shell> ftp cmd).

Initialising: alloc,init,UnlockComponent on CkoFtp2. Did try using passive, tls and the other options. Setting password, host and username as NSString.

I am pretty unsure how to get this done and what the problem is.

(made the universal libchilkatIos.a - as show in the docs.)

Really hope you can give me a helping hand, thx for any advice.

Nabil Redmann --- for --- (nabil AT appjigger DOT com)

essentially - xcode debug console log:

DllDate: Aug 15 2013
UnlockPrefix: Anything for 30-day trial
Architecture: Little Endian; 32-bit
Language: IOS Objective-C
VerboseLogging: 0
  enabled: no
  heartbeatMs: 0
  sendBufferSize: 65536
ImplicitSsl: 0
AuthTls: 0
AuthSsl: 0
Hostname: domainname.tld
Port: 21
IdleTimeoutMs: 60000
ConnectTimeout: 60
ConnectTimeoutMs_1: 60000
calling ConnectSocket2
IPV6 enabled connect with NO heartbeat.
connectingTo: domainname.tld
GetHostByNameHB_ipv4: Elapsed time: 1 millisec
Info: Socket operation in progress..
myPort_1: 55728
connect successful (1)
Turning on TCP_NODELAY.
  SO_SNDBUF: 131768
  SO_RCVBUF: 131768
initialStatus: 220
initialResponse: 220 FTP on abc123345.hosterserver.tld ready
Logging in...
Username: nabil
USER_reply: 331 Password required for nabil
Sending PASS command...
Getting PASS reply...
Password failed
FtpResponse13: 530 Login incorrect.
Sending QUIT command...
Sent QUIT command.
QuitReply: 221 Goodbye.

Accepted Answer

I think it very unlikely that the password string is passed incorrectly. If it were, then the FTP2 component would be essentially unusable and Chilkat would certainly hear about it.

The only thing I can think of is if the password contains non-usascii chars. Then the question would arise -- what byte representation (character encoding) is to be used for these chars? For example, if an accented European vowel is in the password, the ANSI byte representation would be a single byte, but utf-8 would be 2 bytes. Maybe this is the problem?

Other sanity checks you might do: Are you connecting to the same FTP server? Is the username exactly the same? Does the username have non-usascii chars?


Ok thanks. The paragraph ยง letter can not be transmitted correctly as part of the password.