Ftp @ in username problem
Moderator: Rathinagiri
Ftp @ in username problem
Hi all,
My webhost only allow @ in username when making extra ftp accounts
I found already this:
/* Comprobamos si el usuario contiene una @ para forzar el userid */
IF At( "@", cUser ) > 0
oFTP:oUrl:cServer := cServer
oFTP:oUrl:cUserID := cUser
oFTP:oUrl:cPassword := cPassword
ENDIF
Try to implement it, but cannot get it to work,
i think ( as dummy ) oFTP:Open ( cURL ) has still the @ in username ?
Or ?
My code, ftp is working, i will delete account after i get it to work:
*---------------------------------------------------------------------------*
FUNCTION FTPUPLOAD ( cFILE )
*---------------------------------------------------------------------------*
LOCAL lOK := .F.
LOCAL cUSER := "Eldemo@johnsjn22.twentytwo.axc.nl"
LOCAL cSERVER := "johnsjn22.twentytwo.axc.nl"
LOCAL cPASSWORD := "12345"
LOCAL cUrl := "ftp://" + cUSER + ":" + cPASSWORD + "@" + cSERVER
LOCAL oURL := tUrl():NEW ( cURL )
LOCAL oFTP := tIPClientFtp():NEW ( oURL, .F. )
oFTP:nConnTimeout := 20000
oFTP:bUsePasv := .F.
oFTP:oUrl:cServer := cSERVER
oFTP:oUrl:cUserID := cUSER
oFTP:oUrl:cPassword := cPASSWORD
IF oFTP:Open ( cURL )
? "OK"
oFTP:CLOSE ()
ELSE
? "Error"
ENDIF
RETURN ( lOK )
*---------------------------------------------------------------------------*
Thanks and greetings...
My webhost only allow @ in username when making extra ftp accounts
I found already this:
/* Comprobamos si el usuario contiene una @ para forzar el userid */
IF At( "@", cUser ) > 0
oFTP:oUrl:cServer := cServer
oFTP:oUrl:cUserID := cUser
oFTP:oUrl:cPassword := cPassword
ENDIF
Try to implement it, but cannot get it to work,
i think ( as dummy ) oFTP:Open ( cURL ) has still the @ in username ?
Or ?
My code, ftp is working, i will delete account after i get it to work:
*---------------------------------------------------------------------------*
FUNCTION FTPUPLOAD ( cFILE )
*---------------------------------------------------------------------------*
LOCAL lOK := .F.
LOCAL cUSER := "Eldemo@johnsjn22.twentytwo.axc.nl"
LOCAL cSERVER := "johnsjn22.twentytwo.axc.nl"
LOCAL cPASSWORD := "12345"
LOCAL cUrl := "ftp://" + cUSER + ":" + cPASSWORD + "@" + cSERVER
LOCAL oURL := tUrl():NEW ( cURL )
LOCAL oFTP := tIPClientFtp():NEW ( oURL, .F. )
oFTP:nConnTimeout := 20000
oFTP:bUsePasv := .F.
oFTP:oUrl:cServer := cSERVER
oFTP:oUrl:cUserID := cUSER
oFTP:oUrl:cPassword := cPASSWORD
IF oFTP:Open ( cURL )
? "OK"
oFTP:CLOSE ()
ELSE
? "Error"
ENDIF
RETURN ( lOK )
*---------------------------------------------------------------------------*
Thanks and greetings...
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Ftp @ in username problem
Hynan,
Try this with correct login/pw:
Greetings, Serge
Try this with correct login/pw:
Code: Select all
FUNCTION FTPUPLOAD()
*---------------------------------------------------------------------------*
LOCAL lOK := .F.
LOCAL cUSER := "Eldemo"
LOCAL cSERVER := "johnsjn22.twentytwo.axc.nl"
LOCAL cPASSWORD := "12345"
LOCAL cUrl := "ftp://" + cUSER + ":" + cPASSWORD + "@" + cSERVER
LOCAL oFTP := tIPClientFtp():NEW ( cUrl )
IF oFtp:open()
msginfo( StrValue(oFtp:cReply) + ' ' + StrValue(oFtp:lastErrorMessage()) , 'ok')
lOK := .t.
//oFTP:CLOSE ()
ELSE
msginfo( StrValue(oFtp:cReply) + ' ' + StrValue(oFtp:lastErrorMessage()) , 'nok')
ENDIF
RETURN ( lOK )
FUNCTION StrValue( string, onoff )
/*********************************/
LOCAL retval := pNULL
onoff := Valid_parm( onoff, pLOGICAL, FALSE )
DO CASE
CASE VALTYPE( string ) = pCHARACTER
retval := string
CASE VALTYPE( string ) = pNUMERIC
retval := LTRIM( STR( string ) )
CASE VALTYPE( string ) = pMEMO
retval := IF( (LEN(string) > (MEMORY(0) * 1024) * .80), ;
SUBSTR(string,1, INT((MEMORY(0) * 1024) * .80)), ;
string )
CASE VALTYPE( string ) = pDATE
retval := DTOC( string )
CASE VALTYPE( string ) = pLOGICAL
retval := IF( ( onoff ), IF(string, "On", "Off"), ;
IF(string, "True", "False") )
OTHERWISE
retval := ''
ENDCASE
RETURN( ALLTRIM(retval) )
There's nothing you can do that can't be done...
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Ftp @ in username problem
Hynan,
Error is now: 530 Login incorrect.
Serge
Error is now: 530 Login incorrect.
Serge
There's nothing you can do that can't be done...
Re: Ftp @ in username problem
Hi,
And thanks for thinking with me
cUSER := "Eldemo@johnsjn22.twentytwo.axc.nl"
must be that way
i did try with ftp program with this and its working
Greetings...
And thanks for thinking with me
cUSER := "Eldemo@johnsjn22.twentytwo.axc.nl"
must be that way
i did try with ftp program with this and its working
Greetings...
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Ftp @ in username problem
I can use that username and password to authenticate to the FTP server?
User OK
Login
User OK
Login
20140521-11:18:45 :INETCONNECT( johnsjn22.twentytwo.axc.nl, 21 )
>> <pointer> <<
20140521-11:18:45 :INETERRORCODE( <pointer> )
>> 0 <<
20140521-11:18:45 :INETRECVLINE( <pointer>, , 128 )
>> 220 ProFTPD 1.3.4d Server ready. <<
20140521-11:18:45 :INETERRORCODE( <pointer> )
>> 0 <<
20140521-11:18:45 :INETSENDALL( <pointer>, 13, USER Eldemo<cr><lf> )
>> 13 <<
20140521-11:18:46 :INETRECVLINE( <pointer>, , 128 )
>> 331 Password required for Eldemo <<
20140521-11:18:46 :INETERRORCODE( <pointer> )
>> 0 <<
20140521-11:18:46 :INETSENDALL( <pointer>, 12, PASS 12345<cr><lf> )
>> 12 <<
20140521-11:18:46 :INETRECVLINE( <pointer>, , 128 )
>> 530 Login incorrect. <<
20140521-11:18:46 :INETERRORCODE( <pointer> )
>> 0 <<
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: Ftp @ in username problem
Hi danielmaximiliano,
I only know,
i tested ftp login
( i copy/paste from source in this post to make sure )
LOCAL cUSER := "Eldemo@johnsjn22.twentytwo.axc.nl"
LOCAL cSERVER := "johnsjn22.twentytwo.axc.nl"
LOCAL cPASSWORD := "12345"
and it works
i did use totalcommander ftp function
maby any login name ftp server ask for password
Greetings and thanks...
I only know,
i tested ftp login
( i copy/paste from source in this post to make sure )
LOCAL cUSER := "Eldemo@johnsjn22.twentytwo.axc.nl"
LOCAL cSERVER := "johnsjn22.twentytwo.axc.nl"
LOCAL cPASSWORD := "12345"
and it works
i did use totalcommander ftp function
maby any login name ftp server ask for password
Greetings and thanks...
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Ftp @ in username problem
the FTP server might work in safe mode and need secure authenticationhynan wrote:Hi danielmaximiliano,
I only know,
i tested ftp login
( i copy/paste from source in this post to make sure )
LOCAL cUSER := "Eldemo@johnsjn22.twentytwo.axc.nl"
LOCAL cSERVER := "johnsjn22.twentytwo.axc.nl"
LOCAL cPASSWORD := "12345"
and it works
i did use totalcommander ftp function
maby any login name ftp server ask for password
Greetings and thanks...
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: Ftp @ in username problem
Hi,
***
the FTP server might work in safe mode and need secure authentication
***
I think not
with main ftp account ( no @ in username )
same settings in ftp program as Eldemo account
both works ok
In Harbour with main ftp account ( no @ in username )
works ok.
Only account with @ in username gives problem
Thanks and greetings.
***
the FTP server might work in safe mode and need secure authentication
***
I think not
with main ftp account ( no @ in username )
same settings in ftp program as Eldemo account
both works ok
In Harbour with main ftp account ( no @ in username )
works ok.
Only account with @ in username gives problem
Thanks and greetings.
Re: Ftp @ in username problem
Hi all,
Did some testing with main ftp account,
what is working OK in Harbour
LOCAL cUSER := "GOODACCOUNTNAME"
LOCAL cSERVER := "johnsjn22.twentytwo.axc.nl"
LOCAL cPASSWORD := "12345"
LOCAL cUrl := "ftp://" + "NOTGOODACCOUNTNAME" + ":" + cPASSWORD + "@" + cSERVER
oFTP:oUrl:cServer := cSERVER
oFTP:oUrl:cUserID := cUSER
oFTP:oUrl:cPassword := cPASSWORD
Works not, because
oFTP:oUrl:cUserID := cUSER
does not doing what it should do ?
Thanks and greetings...
Did some testing with main ftp account,
what is working OK in Harbour
LOCAL cUSER := "GOODACCOUNTNAME"
LOCAL cSERVER := "johnsjn22.twentytwo.axc.nl"
LOCAL cPASSWORD := "12345"
LOCAL cUrl := "ftp://" + "NOTGOODACCOUNTNAME" + ":" + cPASSWORD + "@" + cSERVER
oFTP:oUrl:cServer := cSERVER
oFTP:oUrl:cUserID := cUSER
oFTP:oUrl:cPassword := cPASSWORD
Works not, because
oFTP:oUrl:cUserID := cUSER
does not doing what it should do ?
Thanks and greetings...
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Ftp @ in username problem
can you tell me how to create a new user and the requirements demanded by the web server?hynan wrote:Hi all,
Did some testing with main ftp account,
what is working OK in Harbour
LOCAL cUSER := "GOODACCOUNTNAME"
LOCAL cSERVER := "johnsjn22.twentytwo.axc.nl"
LOCAL cPASSWORD := "12345"
LOCAL cUrl := "ftp://" + "NOTGOODACCOUNTNAME" + ":" + cPASSWORD + "@" + cSERVER
oFTP:oUrl:cServer := cSERVER
oFTP:oUrl:cUserID := cUSER
oFTP:oUrl:cPassword := cPASSWORD
Works not, because
oFTP:oUrl:cUserID := cUSER
does not doing what it should do ?
Thanks and greetings...
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO