Authenticating users against your own DataBase

Syncplify.me Server! version: 4.0.16+

Note: in order to use the code posted in this article you need to be running at least version 4.0.16 or greater of Syncplify.me Server!

As you all know, Syncplify.me Server! already supports its own internal users, as well as Windows and Active Directory users (and groups, depending on the license type). Yet, some of our customers need to implement totally custom authentication methods, often based on their own user databases.

In this article we will show one way to do so. This is clearly just meant to serve as an example, and real-life scenarios require some further customization to the DB and the script posted here. But it’s a fairly decent starting point.

So, the background scenario for this example is:

  • our users’ authentication data are stored in a Microsoft(R) Access database
  • in our DB, each user is associated to a “category” (in this case his/her department: sales, marketing, …)
  • for the sake of this example, all users’ passwords are set to “password” (without quotes)
  • the script is pretty sophisticated, because besides authenticating the user, it will load a user profile that belongs to the “category” of the user from the main Syncplify.me Server! user-base

So let’s start taking a look at our user database: Continue reading

Scripting lesson: email a list of all uploaded files

Syncplify.me Server! version: 3.1.21+

One of the ready-made script examples that is installed along with Syncplify.me Server! shows how to notify someone via email each time a file is uploaded. But what if you wanted to send only one email, at the end of the file transfer session, with the list of all files that were uploaded in such session?

You can easily do that with 2 simple scripts bound to 2 different event handlers.

First of all you will need a script bound to the “AfterFileUpload” event handler, to keep the list up to date:

Continue reading

Extending your SFTP Server: Lesson #1

This is the first of a series of video lessons to help our users learn how to unleash the full power of Syncplify.me Server! by writing scripts that are executed automatically upon occurrence of certain events.

This first script is kind of a “hello world”, but it’s meant to give our users a glimpse of the features Syncplify.me Server! puts at their disposal.

Once you’ve watched the video, if you don’t want to re-type the script by hand, here’s the source code for you, ready to copy and paste.

 

Handling custom SITE commands over FTP(E/S)

This article refers to a new feature that will be introduced in the upcoming Syncplify.me Server! version 4.0.

As many of you know, the FTP protocol (and therefore also both its encrypted versions FTPS and FTPES) feature a very simple way for clients to send custom commands to the server: the SITE command (RFC 959).

Some servers implement a fixed set of site-specific commands through it, but Syncplify.me Server! v4 goes beyond that and gives the server’s administrator total control over the SITE command handler behavior and response. Continue reading

New release: Syncplify.me Server! v3.0.4.34

This new minor release adds a couple string-management functions to the scripting (event-handling) subsystem:

  • StrMD5: calculates the MD5 hash code of a string (supports both ANSI and Unicode)
  • StrSHA1: calculates the SHA1 hash code of a string (supports both ANSI and Unicode)

As usual you can download the latest version from our web site.

Syncplify.me Server! v3.0: improved session object

Thanks to our precious beta-testers (Izzy, Antonio, and “the gang”) we have been greatly improving our session object, for the joy of all users who take advantage of Syncplify.me Server!’s event-handling subsystem in order to run their own scripts.

In addition to all the properties and methods that were already present in v2.x, the new version will also feature the following ones:

Continue reading

Receive a notification email when someone tries to log in

A very common request from our customers is to be able to receive an email notification whenever someone tries to log into their FTP(S)/SFTP server with the wrong credentials.

You can do that by taking advantage of the new “after a failed authentication” event handler that we’ve introduced in Syncplify.me Server! version 1.0.5.15. Here is how to do it:

Continue reading