Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Send 'CLNT client_type' before enabling UTF8." when Login #356

Open
FatsLan opened this issue Dec 7, 2023 · 0 comments
Open

"Send 'CLNT client_type' before enabling UTF8." when Login #356

FatsLan opened this issue Dec 7, 2023 · 0 comments
Labels
defect The code does not work as intended

Comments

@FatsLan
Copy link

FatsLan commented Dec 7, 2023

Description

When I try to login to a ftp server, return a unexpected error that "Send 'CLNT client_type' before enabling UTF8."

And I can login the ftp server by Filezilla success

Pls help on it, below is my code:

type FTPClient struct {
        client *ftp.ServerConn
}

func NewFTPClient(server, username, password string) (*FTPClient, error) {
	client, err := ftp.Dial(server)
	if err != nil {
		return nil, err
	}

	err = client.Login(username, password)
	if err != nil {
		_ = client.Quit()
		return nil, err
	}

	return &FTPClient{client: client}, nil
}
@FatsLan FatsLan added the defect The code does not work as intended label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect The code does not work as intended
Projects
None yet
Development

No branches or pull requests

1 participant