This scenario is a special mode of CrushFTPDrive to make it act as a transparent SMB proxy to a CrushFTP server. These only work on CrushFTPDrive v2.5.33 and above.

*Please note! This is not a magical solution to mount CrushFTP servers as a local drive on machines. This solution works for the right use cases, but needs testing to ensure it works with your particular app and use case scenario.

Example launch command (very long):
java -Dcrushftpdrive.base_url= -Dcrushftpdrive.server_ip= -Dcrushftpdrive.server_port=13000 -Duser.home=./ -Dcrushftpdrive.smbserver=true -Dcrushftpdrive.writeprefs=false -Dcrushftpdrive.writelog=false -Dcruftpdrive.writelogconsole=false -Dcrushftpdrive.username_pass_separator=, -Dcrushftpdrive.allowed_ips=,192.168.1.* -cp CrushFTPDrive.jar:alfresco-jlan.jar com.crushftp.client.smb.CrushFTPDrive -d drive_username=MyUser drive_password=. drive_auto=false drive_letter=CrushFTPDriveHome drive_auto_open=false map_drive=false

This now lets us mount a URL such as:

We can login with the username of "MyUser,password" and any password in our SMB client. , separates the username and password as specified by our parameters.

Lets break down what all those parameters are:

This is the URL to the CrushFTP server. This is how we will be logging into it.

This is the SMB server IP we are goign to bind to, being all ips on the current machine.

This is the server port we will bind on waiting for connections. 445 is the default SMB port.

This sets the java home location tot he current folder...important if you allow logging or creation of a prefs.XML file.

Force start a SMB server, by default this is true except if launching this on OSX.

Block the saving of a prefs.XML file containing our inline prefs we define.

Block the writing of a physical log file, usually you will want this to be true.

Write the log to the console instead of to a separate log file...good for a temporary quick debugging of an issue without using a log file.

Specify which IPs or IP patterns are allowed to connect to this instance. We do not authenticate users based on username or password, we only authenticate based on source ip. (And the next option, see below.)

Specify that the username contains both username and password with a separator character. This is necessary since we cannot get the password from the login to sue it for authentication to the remote server. So the password is ignored entirely and the username is parsed into two separate parts..

Now we specify the jar files we are using to run this Java app...this includes the alfresco jar and the CrushFTPDrive jar. On windows the separator is the ; character instead of the colon character, but we assume your doing this in Linux. These jar files are located in your CrushFTP folder's WebInterface, CrushFTPDrive folder.
-cp CrushFTPDrive.jar:alfresco-jlan.jar

Now we specify the class of the app to launch with:
The main parameter that makes it run in a daemon mode comes next:

Followed by prefs.XML values that we are defining in line so we don't need to rely on a prefs.XML file to be loaded.

drive_username=MyUser drive_password=. drive_auto=false drive_letter=CrushFTPDriveHome drive_auto_open=false map_drive=false
  • We are passing in the password of "." since we are overriding this with the comma separator for user,pass in the username.
  • We are not mapping a drive liek in the traditional sense that CrushFTPDrive normally does since its acting as a proxy, so we set it not to map, and don't auto open.
  • Driver letter is irrelevant in this scenario as well.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-11) was last changed on 07-Jul-2017 03:56 by Ben Spink
G’day (anonymous guest)


New: CrushFTPv9#


CrushFTP8 | What's New

Referenced by

JSPWiki v2.8.2