Skip to content

How do I configure port/passive mode #407

@Aliuyanfeng

Description

@Aliuyanfeng

Describe the bug
I want to be able to configure the port and passive mode of ftp

To Reproduce

func (p *FTPPool) newConnection() (*ftp.ServerConn, error) {
	conn, err := ftp.Dial(p.host, ftp.DialWithTimeout(5*time.Second), ftp.DialWithForceListHidden(true))
	if err != nil {
		return nil, err
	}
	err = conn.Login(p.username, p.password)
	if err != nil {
		return nil, err
	}
	return conn, nil
}

FTP server

  • Name and version: vsftpd 3.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectThe code does not work as intended

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions