Hello,
I want to change the folder's permission to 777 using "luasocket.ftp",
write the file I get from a inputfile, then change the folder's
permission to 755, but it's not working.
I've tried:
function chmod(u)
local t = {}
local p = url.parse(u)
p.command = "SITE CHMOD 0777 upload"
p.type = "i"
p.path = "/lua_webdocs/"
p.sink = ltn12.sink.table(t)
local r, e = ftp.put(p)
return r and table.concat(t), e
end
cgilua.print(chmod([[ftp://user:p...@localhost]]))
and get:
nil 550 Could not change perms on upload lua_webdocs/: No such file or
directory
but if I do:
p.command = "nlst"
local r, e = ftp.get(p)
It returns the files and folders of "/lua_webdocs/", and there shows
"upload" folder.
Another thing, how do I pass multiple ftp commands? Does the connection
closes after "local r, e = ftp.put(p)"?
--
Itamar Eduardo Gonçalves de Oliveira
_______________________________________________
Kepler-Project mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/