This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Doridian's profile picture

[Bukkit][Smp]Computercraft Ftp

Started by Doridian, 26 February 2012 - 08:20 PM
Doridian #1
Posted 26 February 2012 - 09:20 PM
WARNING: This is not a pure lua program! Its an actual Mod. Currently Bukkit only

Have you ever wanted to let your users edit their files easier?
Maybe with an editor with actual syntax highlighting?
Well, this is now possible!
What this mod does is provide users with a way to access their computer with *any* FTP client that exists (FileZilla to name an example, but even the default Windows explorer has support to connect to FTP servers).

Download: https://github.com/d...TPd/CCFTP_7.zip
Source: https://github.com/D...mputerCraftFTPd

Installation
Extract the file you downloaded (CCFTP_7.zip) to your mods directory. If it asks you to overwrite/integrate your ComputerCraft folder that is normal and you respond to the question with "Yes" (all it will do is place the ftppasswd file into your lua/rom/programs folder)
Start up your server, it will create a file in the config folder, tweak it if you want a different port (or bind IP, by default it gets the IP from the server its running on and uses the same).

Usage
Go to your computer, enter "ftppasswd", it will make you enter a password and re-enter it to exclude typing errors. You can re-enter the command at any time to change your password if you wish.
Once you set the password, type "id". It will say somehting like "The ID of this computer is #XXX".
The number that comes after the # is the username you will need for FTP, the password you set earlier is your password.
WARNING:If connection doesn't work, try the ussername "WORLDNAME.ID" (for example: "awesomeland.69") And if that still doesn't work, try "world.ID" (ex.: "world.69").
So now, you can just use any FTP client and connect to the server (by default, the port is 2221, not 21)
If you ever want to remove FTP access to a computer, just remove the "_ftppasswd" file from your computer (in the root folder).

If you got any more questions, just ask!
Edited on 25 March 2012 - 03:41 PM
Kane Hart #2
Posted 27 February 2012 - 06:09 AM
This is amazing. I was wondering how secure and safe is this? Also is there limits or should I worry about people uploading movies on it lmao.

Also last question is this off the main thread?
Doridian #3
Posted 27 February 2012 - 12:46 PM
This is amazing. I was wondering how secure and safe is this? Also is there limits or should I worry about people uploading movies on it lmao.

It is as secure as your password and computer. Pick an insecure password and someone might guess it (together with your computer ID).
If you are worried about people changing your password and then abusing your pc, well, if they can access the "ftppasswd" command in the first place, that means they have access to your computer's commandline and could just fiddle around with stuff anyway.

About the topic of uploading movies and stuff: Theoretically possible, even though unsuitable for public sharing (anyone you give access to could just delete or upload more files). But I will look into implementing a (configurable) maximum filesize limit.

Also last question is this off the main thread?
I don't understand that question
Kane Hart #4
Posted 27 February 2012 - 08:41 PM
This is amazing. I was wondering how secure and safe is this? Also is there limits or should I worry about people uploading movies on it lmao.

It is as secure as your password and computer. Pick an insecure password and someone might guess it (together with your computer ID).
If you are worried about people changing your password and then abusing your pc, well, if they can access the "ftppasswd" command in the first place, that means they have access to your computer's commandline and could just fiddle around with stuff anyway.

About the topic of uploading movies and stuff: Theoretically possible, even though unsuitable for public sharing (anyone you give access to could just delete or upload more files). But I will look into implementing a (configurable) maximum filesize limit.

Also last question is this off the main thread?
I don't understand that question

Ok thanks I was worried about server security more then anything but it sounds like it will be just fine hehe.


Threading question is a lot of third party features like dynmap and etc run on its own thread to not bog down the server. With this feature it sounds like if I send a crap load of small files on a fast connection to the server it might start causing load. The question is the ftp actually threaded to prevent this or is it on the main thread?

Thanks :P/>/>
Doridian #5
Posted 27 February 2012 - 09:56 PM
Added configurable maximum filesize, by default its 1MB (should be enough for scripts)
gknova6 #6
Posted 28 February 2012 - 09:22 PM
What is holding you back from doing this on vanilla? Bukkit is so buggy when it comes to mods
Doridian #7
Posted 04 March 2012 - 02:15 AM
What is holding you back from doing this on vanilla? Bukkit is so buggy when it comes to mods
That I simply never touched a Vanilla Minecraft server and to get Java to compile the mod into the default package (class without a package line) you need to use tricks, such as editors, and I just don't know how to without having to set up a whole MCP server workspace.
incision1384 #8
Posted 04 March 2012 - 03:15 AM
For some reason i cannot connect

status: Connecting to 127.0.0.1:27016…
Status: Connection established, waiting for welcome message…
Response: 220 Service ready for new user.
Command: USER world.3
Response: 331 User name okay, need password for world.3.
Command: PASS *******
Response: 230 User logged in, proceed.
Command: SYST
Response: 215 UNIX Type: Apache FtpServer
Command: FEAT
Response: 211-Extensions supported
Response: SIZE
Response: MDTM
Response: REST STREAM
Response: LANG en;zh-tw;ja;is
Response: MLST Size;Modify;Type;Perm
Response: AUTH SSL
Response: AUTH TLS
Response: MODE Z
Response: UTF8
Response: TVFS
Response: MD5
Response: MMD5
Response: MFMT
Response: 211 End
Command: OPTS UTF8 ON
Response: 200 Command OPTS okay.
Command: OPTS MLST size;modify;type;
Response: 200 Command OPTS okay.
Status: Connected
Status: Retrieving directory listing…
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Command TYPE okay.
Command: PASV
Response: 227 Entering Passive Mode (222,154,147,225,190,138)
Command: MLSD
Response: 150 File status okay; about to open data connection.
Error: Connection timed out
Error: Failed to retrieve directory listing
Doridian #9
Posted 04 March 2012 - 12:28 PM
For some reason i cannot connect

status: Connecting to 127.0.0.1:27016…
Status: Connection established, waiting for welcome message…
Response: 220 Service ready for new user.
Command: USER world.3
Response: 331 User name okay, need password for world.3.
Command: PASS *******
Response: 230 User logged in, proceed.
Command: SYST
Response: 215 UNIX Type: Apache FtpServer
Command: FEAT
Response: 211-Extensions supported
Response: SIZE
Response: MDTM
Response: REST STREAM
Response: LANG en;zh-tw;ja;is
Response: MLST Size;Modify;Type;Perm
Response: AUTH SSL
Response: AUTH TLS
Response: MODE Z
Response: UTF8
Response: TVFS
Response: MD5
Response: MMD5
Response: MFMT
Response: 211 End
Command: OPTS UTF8 ON
Response: 200 Command OPTS okay.
Command: OPTS MLST size;modify;type;
Response: 200 Command OPTS okay.
Status: Connected
Status: Retrieving directory listing…
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Command TYPE okay.
Command: PASV
Response: 227 Entering Passive Mode (222,154,147,225,190,138)
Command: MLSD
Response: 150 File status okay; about to open data connection.
Error: Connection timed out
Error: Failed to retrieve directory listing
Are you behind a router?
If so, a connection to *yourself* most likely won't work and you need to forward ports 40000-50000 TCP (the WHOLE range) to your PC aswell as the FTP port.
Doridian #10
Posted 23 March 2012 - 11:41 PM
Updated to work with 1.2.3 :3
czp #11
Posted 24 March 2012 - 04:09 PM
This is very nice! Hey, I have small question to you.
You programmed this, so you are at least a little skilled Java/Bukkit mods developer. Did you thinked about mod like this but telnet or ssh to ComputerCraft console? Please think about it, I think it can be very good! :(/>/>
baunegaard #12
Posted 28 March 2012 - 12:57 PM
For some reason i cannot connect

status: Connecting to 127.0.0.1:27016…
Status: Connection established, waiting for welcome message…
Response: 220 Service ready for new user.
Command: USER world.3
Response: 331 User name okay, need password for world.3.
Command: PASS *******
Response: 230 User logged in, proceed.
Command: SYST
Response: 215 UNIX Type: Apache FtpServer
Command: FEAT
Response: 211-Extensions supported
Response: SIZE
Response: MDTM
Response: REST STREAM
Response: LANG en;zh-tw;ja;is
Response: MLST Size;Modify;Type;Perm
Response: AUTH SSL
Response: AUTH TLS
Response: MODE Z
Response: UTF8
Response: TVFS
Response: MD5
Response: MMD5
Response: MFMT
Response: 211 End
Command: OPTS UTF8 ON
Response: 200 Command OPTS okay.
Command: OPTS MLST size;modify;type;
Response: 200 Command OPTS okay.
Status: Connected
Status: Retrieving directory listing…
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Command TYPE okay.
Command: PASV
Response: 227 Entering Passive Mode (222,154,147,225,190,138)
Command: MLSD
Response: 150 File status okay; about to open data connection.
Error: Connection timed out
Error: Failed to retrieve directory listing

I have this exact same problem, 2221 port is forwarded, and ports 40000 - 50000 is also forwarded, i am able to login but something goes wrong at "Failed to retrieve directory listing".

Also i get this error in the log at start:
2012-03-27 19:00:17 [SEVERE] log4j:WARN No appenders could be found for logger (org.apache.ftpserver.impl.DefaultFtpServerContext).
2012-03-27 19:00:17 [SEVERE] log4j:WARN Please initialize the log4j system properly.

Really hoping to get this working this is such a great idea.
lukeplechaty #13
Posted 28 March 2012 - 02:07 PM
Doridian can i relish this to work with vanilla minecraft server or give it to you for pep to use.
Matchlighter #14
Posted 29 March 2012 - 06:59 AM
For some reason i cannot connect

status: Connecting to 127.0.0.1:27016…
Status: Connection established, waiting for welcome message…
Response: 220 Service ready for new user.
Command: USER world.3
Response: 331 User name okay, need password for world.3.
Command: PASS *******
Response: 230 User logged in, proceed.
Command: SYST
Response: 215 UNIX Type: Apache FtpServer
Command: FEAT
Response: 211-Extensions supported
Response: SIZE
Response: MDTM
Response: REST STREAM
Response: LANG en;zh-tw;ja;is
Response: MLST Size;Modify;Type;Perm
Response: AUTH SSL
Response: AUTH TLS
Response: MODE Z
Response: UTF8
Response: TVFS
Response: MD5
Response: MMD5
Response: MFMT
Response: 211 End
Command: OPTS UTF8 ON
Response: 200 Command OPTS okay.
Command: OPTS MLST size;modify;type;
Response: 200 Command OPTS okay.
Status: Connected
Status: Retrieving directory listing…
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Command TYPE okay.
Command: PASV
Response: 227 Entering Passive Mode (222,154,147,225,190,138)
Command: MLSD
Response: 150 File status okay; about to open data connection.
Error: Connection timed out
Error: Failed to retrieve directory listing

I have this exact same problem, 2221 port is forwarded, and ports 40000 - 50000 is also forwarded, i am able to login but something goes wrong at "Failed to retrieve directory listing".

Also i get this error in the log at start:
2012-03-27 19:00:17 [SEVERE] log4j:WARN No appenders could be found for logger (org.apache.ftpserver.impl.DefaultFtpServerContext).
2012-03-27 19:00:17 [SEVERE] log4j:WARN Please initialize the log4j system properly.

Really hoping to get this working this is such a great idea.

I am having the same problem as well; it authenticates and then fails at directory listing. And I don't think it is a port forwarding issue since FTP works just fine with vsftpd (which I have stopped to check for port conflicts).