Skip to content

socket.ftp and "553 User not allow" without extra '/' for some servers #456

@codeninja-ru

Description

@codeninja-ru

I have an issue while trying to connect to ftp on WD My Cloud (it uses some modification of pure-ftp server)

this code returns:

local ftp = require("socket.ftp")

f, e = ftp.get("ftp://myserver/books/test.txt;type=i")
print(f)
print(e)
nil
553 User not allow

but curl or wget get the file without fail

curl "ftp://myserver/books/test.txt"
Hello World!

I starts to work when I add an extra '/' after the host

local ftp = require("socket.ftp")

f, e = ftp.get("ftp://myserver//books/test.txt;type=i")
print(f)
print(e)

returns

Hello World!

nil

I believe this can be fixed in luasocket since curl and wget work somehow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions