HOWTO: API/CLI into BPFTP Server

BulletProof FTP Server is an excellent FTP Server for Windows. With the recent development efforts in v2011, we thought it would be a good time to introduce some of the command-line-switches (CLI) for managing BPFTP Server from external programs, web-sites, scripts, etc.

NOTE: At times you’ll see BulletProof FTP Server for Windows referred to as “BPS”.

Let’s first start with a brief explanation of the binaries distributed with BulletProof FTP Server for Windows (BPS):

The default installation location for the program is located in the following location:
%PROGRAMFILES%\BulletProof FTP Server 2011\

Depending on your version of Windows, %PROGRAMFILES% is expanded to the following for 32-Bit and 64-Bit versions of Windows:
C:\Program Files\BulletProof FTP Server 2011\
C:\Program Files (x86)\BulletProof FTP Server 2011\

Investigating this location will yield the following executables:
bpftpserver-2011.exe – Main executable for the program
bpftpserver-adduser.exe – CLI to manipulating the User & Group Database
bpftpserver-service.exe – responsible for controlling BPS when it’s running as a Windows System Service
CSDispatcher.exe – used with “remote debug” for sending log-messages to our remote-server

MAIN EXECUTABLE

bpftpserver-2011.exe [OPTION]

-reload
Will cause the running instance of BPS to reload the settings, users and group information.

-online
Take BPS online and ready for incoming connections.

-offline
Take BPS offline and disable the listener from answering incoming connections.

-exit
Terminate BPS and stop it’s execution on the system. All users will be forcibly disconnected.

-close
Keep BPS online and all active-connections maintain, but disable the listener; resuling in no *new* connections accepted.

-open
Renable the listener, allowing new connections to be accepted.

-startlogging
Start logging to the log-file defined in the software.

-stoplogging
Stop logging to the log-file.

-kickall
Kick all currently connected users off of the server.

-stat
Regenerate the statistics files for users in the system.

CLI ADDUSER

BulletProof FTP Server 2011 command-line utility 'bpftpserver-adduser.exe'
Copyright (c) 1998-2011 BulletProof Software LLC, All Rights Reserved.

Command-line utility to manipulate the USER and GROUP database for BulletProof FTP Server 2011.

Usage: bpftpserver-adduser.exe [OPTION]…

-list=USERNAME[*,?]
-name=ACCOUNTNAME
-enabled
-disabled
-login=USERNAME
-group=GROUPNAME
-pswd=PASSWORD
-crypt
-access=PATH,ACCESSRIGHTS
-loginmsg=FILENAME
-speedlimit=[0,1]
-speedrcv=BYTES-PER-SECOND
-speedsnd=BYTES-PER-SECOND
-banfile=FILEMASK[,FILEMASK2,FILEMASK3,...]

Access = R(ead) W(rite) D(elete) A(ppend) M(ake) L(ist) S(ubdir) K(delete dir)

First -access will be Home Directory

Example :
C:\Program Files (x86)\BulletProof FTP Server 2011\bpftpserver-adduser.exe -name=newuser -enabled -login=newlogin -pswd=newpass -group=demogroup -loginmsg=c:\login.txt -access=c:\ftproot\,RLS -banfile=+*.jpg,+*.gif

Some explanation of the behavior is important, specifically the “-access” parameter. In the above example the login of “newlogin” for the account “newuser” is given the directory of “c:\ftproot\”

We’ll break down the command-line, piece by piece

-name=newuser
While initially confusing, there’s a difference between an “account-name” and the “login-name”. The account-name refers to a “user-friendly” name for the account, such as “upstairs accountant” and “log-name” is the actual login that used to access the ftp-server; such as “accountant”.

-enabled
Will enable the account for login

-login=newlogin
The login-name for the user to use to access the ftp-server (see above not for -name)

-pswd=newpass
The password for the login

-group=demogroup
If the account belongs to a group, you can specify the name of the group (OPTIONAL)

-loginmsg=c:\login.txt
Will send a user-specific login-message via the protocol to the user after logging in (OPTIONAL)

-access=c:\ftproot\,RLS
Will add an access-right for the account to the directory c:\ftproot\ with the privledges of (R)ead,(L)ist,(S)ubdir . The first access-right specified will be the HOME-DIRECTORY for the user. Additional access-rights can be defined by use the “-access” parameter again. If you are specifying a user-account that already exists, then all access-rights for the account will be deleted and given the access-rights that you define here.

-banfile=+*.jpg,+*.gif
Will add a file-mask of files that the user-account is prohibited from uploading or downloading. (OPTIONAL)

UPDATE: BulletProof FTP Server 2011.1.0.67 (Fix for CD/CWD)

Today, we are proud to release a minor-update to BulletProof FTP Server for Windows 2011 (version 2011.1.0.67). For all customers with a current license, please download/install the demo/trial version from our website and it will automatically update itself to the full-version on your computer.

Download the Newest Version Here

Emergency Fix for 2011.1.0.66: In an attempt to make a quick fix to a problem on the start of the national-holiday weekend, a mistake was made in the internals of the code; in which the ability to change-the-working-directory or “CD/CWD” was broken. This problem was fixed immediately and a new version was released.

What’s New aka Changelog (Copied Below)
Version 2011.1.0.67 – 2011-JUL-05
————————————————————————-
* Fixed: Resolved a problem regarding changing-directories (CWD, CD). In the version released a couple days ago, a bug inadvertently made it’s way in due to the restructuring of the initialization-code and the handling of the change-of-working-directory (CWD).

UPDATE: BulletProof FTP Server 2011.1.0.66

Today, we are proud to release a minor-update to BulletProof FTP Server for Windows 2011 (version 2011.1.0.66). For all customers with a current license, please download/install the demo/trial version from our website and it will automatically update itself to the full-version on your computer.

Download the Newest Version Here

Wow. It’s been a flurry of releases as we make small corrections to the v2011 base code. In this update, thanks to “t.tosh”, we’ve corrected a couple errors in the scripts used to start/stop the windows-system-service. In addition, we’ve put a quick link in the “Server Info” to indicate the current and available version of the program.

What’s New aka Changelog (Copied Below)
* Fixed: Resolved a problem in the external batch-files which are used to stop/start the windows-system-service from the windows-start-menu, it was making a call to the wrong string-description of the bpftpserver-service (“BulletProof FTP Server 2010″ not “BulletProof FTP Server 2011″).. thanks “t.tosh”.
* Improved: Added version-check functionality to the “Server Info” main-panel on the left of the UI; it will now report back the current version installed/available and take you to a web-page for updating
* Improved: In prepartion for Secure-SSL, internal restructuring of the code for initialization of the ftp-server-component (on-events) has been moved from design-time to run-time.

Get $5 with Facebook and Google

It’s a new world and social bookmarks are poised to be the next focus for search-engines. To this end, we’d like to your help to get on these networks!

It’s easy, just go to our website and click the Google +1 and Like Us on Facebook. Then shoot us an email with your OrderID and we’ll credit your order with $5!

Get $5 with Facebook and Google

Contact Us with your OrderID for $5 back!
http://www.builtbp.com/contactus

UPDATE: BulletProof FTP Server 2011.1.0.65

Today, we are proud to release a minor-update to BulletProof FTP Server for Windows 2011 (version 2011.1.0.65). For all customers with a current license, please download/install the demo/trial version from our website and it will automatically update itself to the full-version on your computer.

Download the Newest Version Here

This update contains several fixes, mostly related to “Browse” buttons located throughout the program. In addition, there were a few fixes in the “Access-Rights” section of the User & Group Manager. Lastly, in the last update we added the ability to choose the size of the toolbar-icons used in the main-toolbar of the program… in this update, *all* toolbar-icons will use the size you choose. This helps tremendously for customers using reduced desktop-sizes, such as those found with virtual and cloud installations.

What’s New aka Changelog (Copied Below)
* Fixed: (User|Group) Manager -> Edit User|Group -> Access-Rights: Resolved a problem where an Access-Violation (Crash-Report) is generated when right-clicking the “access-rights” for a context-menu and selecting “Explore”; it was not evaluating the selected-item for NIL. Updated the popup-menu-code for enabling/disabling items that are not available if nothing is selected. On that note, I went through *every* context-popup-menu and checked for the same condition, found several and fixed them.
* Improved: Added the ability to change the icon-size for all toolbars in the program. Version 2011.1.0.63 was the first to allow this ability, but only the MainToolbar; this expands this ability to all and syncs them to the same size/caption.
* Fixed: Management -> Server Settings -> Logging -> Log Settings -> “Saved Log-File Location” (Click Browse Button) was causing an access-violation. The variable was being set to the save-dialog-object, but the object was never created and was referencing a random location in memory.
* Fixed: Management -> Server Settings -> Logging -> Log Settings -> “Saved Log-File Location” wrapped new folder-validation-code around the field to confirm that the dir/file can be created and an invalid path wasn’t specified.
* Fixed: Group Manager -> Edit Group -> Access-Rights: Fixed a problem where an Access-Violation was generated when dbl-clicking on an access-right, then hitting cancel in the “Access-Rights for Folder” dialog… (an empty list-item was being added to the list, with no data and caused the AV)
* Fixed: Browse for File Dialogs: Corrected a problem where an exception of EOleSysError was raised when asking to browser-for-a-folder|file. This was result of setting the “dialog.initialdir” to a fully-qualified-filename and not just the path to the file.

UPDATE: BulletProof FTP Server 2011.1.0.64

Today, we are proud to release a minor-update to BulletProof FTP Server for Windows 2011 (version 2011.1.0.64). For all customers with a current license, please download/install the demo/trial version from our website and it will automatically update itself to the full-version on your computer.

Download the Newest Version Here

What’s New aka Changelog (Copied Below)
* Fixed: Resolved a problem where a HOME-license would not allow the full TWO-concurrent-connections, but was limited to ONE
* Improved: Under the Hood -> Migrate from Previous-Version: added the ability to select a directory for the previous-version-files, if it was not found automatically
* Improved: Under the Hood -> Migrate from Previous-Version: added a “manual” option that will allow the user to select a directory which contains the previous-version-files.
* Improved: If running the HOME version under Windows-Server, the software now asks if the user would like to see the upgrade from HOME to CORP information
* Fixed: Management -> Server Settings -> Options -> Refuse Multiple Connection the Same IP: Resolved a language problem in the message that was sent to the ftp-client. It now correctly specifies that the limit is imposed at the server-level and *not* the user-level (as it previously indicated)

HOWTO: Getting Started Video-Guide for BPFTP Server

Great “Getting Started Guide” for BulletProof FTP Server.. the intention of the video is to get the product up an running with Yokogawa DAQMaster MW100; but it’s a great primer!

YouTube:
http://www.youtube.com/watch?v=SLTAo1pDTe4

NOTE: The version used in the video is 2010, but the UI is very unfamiliar to 2011 and you won’t have a problem following it.

HOWTO: Windows Firewall and BPFTP Server 2011

Windows Version: Windows Server 2008 R2, Windows Server 2008, Windows 7/Vista

By default, the latest versions of Windows protects your computer with the Windows Firewall with Advanced Security, effectively blocking access to your computer from the internet and would-be hackers (Getting Started Guide).

However, this also prevents ftp-clients from accessing your installation of BulletProof FTP Server 2011 unless you “open the firewall” to allow access. This means, you must open at least two ports; one for the control-connect and 1 (one) data-port for every concurrent connection to the ftp-server.

NOTE: It’s very common for people to think that only 1 (ONE) port is needed for FTP (default tcp/ip port 21). However, this is NOT the case as you need to define data-ports in order to support Passive-Mode (PASV).


Configuring the Windows Firewall and BPFTP Server 2011 is very simple, but it takes a few steps. Below, we’ve broken down the process:
1) Configure BPFTP Server 2011 for NAT/Firewall and Passive-Mode (PASV)
2) Open the Windows Firewall up for the BPFTP Server 2011
3) Open the Windows Firewall up for the Control-Connection
4) Open the Windows Firewall up for the Data-Ports (Passive-Mode aka PASV)
5) Completed Entries in Windows Firewall

LASTLY: Be sure to run your installation through our Firewall Tester. After providing the IP/Host, Port, User and Password for your installation, this tester will simulate a ftp-user can connect to your BPFTP Server. Please use it!
http://bpftpserver.com/products/bpftpserver/windows/test/firewall

NOTE: If you are running any Anti-Virus or Internet-Security software on your computer (McAfee, Norton, etc) you may also be protected by yet-another-software-based-firewall. Please consult the documentation that came with your software for opening up firewall-ports.

NOTE: Almost everyone has a hardware-based NAT/Firewall router in their network topology. For Home Users, this is usually your WiFi-Router. Please look into the documentation that came with your hard-based NAT/Firewall router for information on opening firewall-ports.

Step-by-Step Directions


BPFTP Server - NAT/Firewall Configuration

Step #1.1: BPFTP Server - NAT/Firewall Configuration


BPFTP Server - Use DNS for PASV

Step #1.2: BPFTP Server - Use DNS for PASV


BPFTP Server - Use Static IP for PASV

Step #1.3: BPFTP Server - Use Static IP for PASV


BPFTP Server - Configure Data-Ports

Step #1.4: BPFTP Server - Configure Data-Ports


Back to Top

2) Open the Windows Firewall up for the BPFTP Server 2011

Open Windows Firewall

Step 2.0: Open Windows Firewall


Create New Firewall-Rule

Step 2.1 Create New Firewall-Rule


Choose Firewall-Rule Type

Step 2.2: Choose Firewall-Rule Type


Browse for Program

Step 2.3: Browse for Program


Choose Program-Path

Step 2.4: Choose Program-Path


Confirm Program-Path

Step 2.5: Confirm Program-Path


Choose Allow

Step 2.6: Choose Allow


Select Firewall Domain

Step 2.7: Select Firewall Domain


Name Firewall-Rule

Step 2.8: Name Firewall-Rule


Back to Top

3) Open the Windows Firewall up for the Control-Connection

Open Windows Firewall

Step 3.0: Open Windows Firewall


Create New Firewall-Rule

Step 3.1: Create New Firewall-Rule


Choose Firewall-Rule Type

Step 3.2: Choose Firewall-Rule Type


Specify Port for Control-Connection

Step 3.3: Specify Port for Control-Connection


Choose Allow

Step 3.4: Choose Allow


Select Firewall Domains

Step 3.5: Select Firewall Domains


Name Firewall-Rule

Step 3.6: Name Firewall-Rule


Back to Top

4) Open the Windows Firewall up for the Data-Ports (Passive-Mode aka PASV)

Open Windows Firewall

Step 4.0: Open Windows Firewall


Create New Firewall-Rule

Step 4.1: Create New Firewall-Rule


Choose Firewall-Rule Type

Step 4.2: Choose Firewall-Rule Type


Specify Port for Data-Ports

Step 4.3: Specify Port for Data-Ports


Choose Allow

Step 4.4: Choose Allow


Select Firewall Domains

Step 4.5: Select Firewall Domains


Name Firewall-Rule

Step 4.6: Name Firewall-Rule


Back to Top

5) Completed Entries in Windows Firewall

Completed Entries in Windows Firewall

Step 5: Completed Entries in Windows Firewall


Back to Top

NEW RELEASE: BulletProof FTP Server 2011

New Release: BulletProof FTP Server 2011

Today, we are proud to announce a new release of our BulletProof FTP Server for Windows 2011.

We’ve looked at every bit of functionality in our previous award-winning version and rewritten it to be better, faster and more intuitive. We are very pleased with it and hope you will be too!

We’ve also done our very best, to make sure this version is a simple upgrade to your previous version; by maintaining the same settings, users/groups and data-formats. In addition, we’ve built an automatic migration utility that will aid in the upgrade to the latest version.

Demo Version (Free 15-Day Trial)
http://bpftpserver.com/products/bpftpserver/windows/download

Product Information
http://bpftpserver.com

Purchasing Information
http://bpftpserver.com/products/bpftpserver/windows/buynow

Previous Customers

  • Customers who have an up-to-date support-entitlement will receive this update for FREE. The new license will be sent out this week, so watch for our email from automated@builtbp.com with the subject of Full Version: BulletProof FTP Server 2011 for…
  • Customers who’s support-entitlement has expired. Please contact us for a previous-customer discount.
    • 2011 Changes

    • Scheduler: We’ve reworked the user-interface and fixed a few problems that prevented the proper execution and set-up of scheduled-events.
    • Users/Groups: The internal functions used to manage users/groups has been rewritten and a number of potential pitfalls in memory-management has been corrected.
    • User-Interface: We’ve taken your input and made the user-interface faster, more streamlined and intuitive. With better memory-management and the ability to size the icons and choose to see the “Console Log” on start-up.
    • Windows System-Service: The support for running the software as a Windows System-Service has been rewritten to better support newer features found in Windows 7 and 2008; as well as reducing the memory-footprint by over 45%!
    • Full Changelog: Got some time to kill and want to see the changes ad nauseam? See the full Changelog with over 65 feature-changes.

    Join us on Facebook
    http://www.facebook.com/pages/Bpftp/17713238532