This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Every linux distro is slightly different. This guide is intended to cover the basics and show you around some of the ways you can configure and work with CrushFTP.

The assumption is that you are doing this install headless.

Java

First, make sure Java is installed properly. By default most linux distros come with a free version of Java that won't work with CrushFTP. Make sure its an official Sun java, or other suitable JVM.

Type:

java -version

If it mentions GNU, it is not the right one.

To run Java, you may need to specify the full path to the java binary. Something possibly like /usr/java/jre1.5.0_11/bin/java. Its going to depend on where you installed it.


Start CrushFTP There is a script provided to give you the basics of starting and stopping CrushFTP. It might be overkill for your situation, but you are welcome to use it and modify it for your needs. The script is "crushftp_init.sh(info)". You must edit the script the first time you use it to set the correct path in it. Additionally, make a copy of the script file as CrushFTP updates will overwrite it.

./crushftp_init.sh start
./crushftp_init.sh stop

Alternate Start CrushFTP Method

The key here is making sure you are in the CrushFTP directory (so its the working directory), and using the "-d" option to start in daemon mode. If you are not in the right directory when you start CrushFTP, it will start generating a new prefs.xml file and users folder from the new location where you started it.

sudo java -Dcrushftp.version=5 -jar CrushFTP.jar -d

You may also want to start it so it stays running even when you logout.

sudo nohup java -Dcrushftp.version=5 -jar CrushFTP.jar -d&

The "-?" option will list various command line options you can use:

java -jar CrushFTP.jar -?

Generating an Admin User

While you technically can do everything with CrushFTP from the command line and editing text XML files, its much easier to use a GUI to do this. You can use remote administration with CrushFTP in order to remote control a headless server. This lets you have a full GUI controlling the headless linux installations of CrushFTP.

To make your user for doing this, use a command like this:

java -jar CrushFTP.jar -a "remoteadmin" "mypassword"

This will make a new user, and write it to the default location:

users/lookup_21/remoteadmin/ -- or -- users/MainUsers/remoteadmin/

Since this is CrushFTP5, you will want to move this user to the proper location if it was generated to the 'lookup_21' folder:

users/MainUsers/

You can then login using this username from a ftp client, or via the remote admin interface of CrushFTP. I recommend using remote admin using HTTP over port 8080. For FTP to work, you may need to adjust the 'passive' IP in the server preferences if CrushFTP has detected the wrong IP on your machine.

https://www.crushftp.com/Docs/Videos/Running_as_a_Service_and_Remote_Administration.mov

https://www.crushftp.com/Docs/Videos/Linux_Install.mov

The basics are opening CrushFTP, clicking manage servers button in the upper right. Add a new item, click on it and set the URL to match the credentials of the user you just made. http://remoteadmin:mypassword@192.168.x.x:8080/ Click apply, then click OK to close the manage servers window. Finally, select your server from the drop down and wait as CrushFTP connects to your server and gives you a remote admin interface to the GUI of the headless server.


Alternate Stop CrushFTP Method

To kill CrushFTP, you can do it one of two ways. The standard kill method will definitely work in stopping the server. Its safe to use as CrushFTP takes precautions against issues that could arise.

You can also do it from a script. Let me explain. CrushFTP supports the "SITE QUIT" command if it has been enabled in the User Manager under the Admin tab for a user. So you can have a scripted command that simply logs into the server, issues SITE QUIT, then logs out. The server will then gracefully quit saving any unsaved data to disk before exiting.

Here is an example shell script to login with FTP with a provided script:

#!/bin/sh ftp -n < ftp.txt

You would then put the following into a ftp.txt file:

open 127.0.0.1
quote user remoteadmin
quote pass password
quote site quit
quote quit

Provided a user named "remoteadmin" exist, and they have permission to execute that command, CrushFTP will terminate once the user logs out.

Generating a Password With CrushFTP from the Command Line

CrushFTP supports a "-p" option to encrypt a password. This is especially useful if you are manipulating CrushFTP user.xml files directly.

java -jar CrushFTP.jar -p thePassword DES

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
sh
configure.sh 0.7 kB 3 11-Mar-2020 09:49 Ben Spink
sh
crushftp_init.sh 3.9 kB 1 25-Oct-2018 04:31 Ben Spink
« This particular version was published on 25-Oct-2018 04:31 by Ben Spink.
G’day (anonymous guest)
CrushFTP9 | What's New

Referenced by
LeftMenu

JSPWiki