Serv-U is a widely used FTP server-side software that supports all Windows series such as 3x/9x/ME/NT/2K. You can set multiple FTP servers, limit the permissions of logged in users, log in home directory and space size, etc., and the functions are very complete. It has very complete security features, supports SSlFTP transmission, supports SSL encrypted connections to protect your data security, etc.
Serv-U supports user and user group settings based on ODBC database, which provides us with a good interface based on Serv-U programming. Next, we will introduce how to implement it in detail.
1. Use ODBC database to manage Serv-U
Prerequisites: Only the enterprise version of Serv-U (version 4.1 or above) can support ODBC. Common supported databases include access, mysql, oracle, mssql, etc.
Some database examples are provided on the official Serv-U English website. This site provides downloads, please select:
Access example: MSAccessODBCExample
·MsSQL Example: MSSQLServerODBCExample
·MySQL example: MySQLODBCExample
Oracle creates SQL file for table structure: Oracledatabaseforuse withServ-U
The following is a description of the usage method using MsSQL as an example
1. Install Serv-U Enterprise Edition (4.1 or above) and create a new domain. In the fourth step, select "Stored in ODBC Database" in the domain type, as shown in the figure:
2. Download the MSSQLServerODBCExample sample package, obtain CreateServUTables.sql (used to create the corresponding table structure of Serv-U in mssql), and execute it in mssql
Line this file and create six tables, namely:
·ftp_users
ftp_userIPs
·ftp_userAccess
·ftp_groups
ftp_groupIPs
·ftp_groupAccess
Among them, ftp_users is the table that stores users, which is the most important thing.
3. Create ODBC. The example process is as follows
(1) Add the system DSN (system data source), select SQL Server, fill in the data source name and server (local is used by the local machine)
(2) The login verification method is determined based on your mssql settings. Here you can log in using SQL verification method
(3) Change the database to create a database for you with Serv-U table, confirm, and complete the ODBC settings. Now that you have a system data source called Serv-U, remember this name and log in to use the user and password.
4. Configure Serv-U
(1) Close Serv-U, obtain the Add-to-Ini.txt file from the MS SQL Server ODBC Example example package, open this file, and copy the following code in full:
[Domain1]
ODBCTables=ftp_users|ftp_groups|ftp_userAccess|ftp_groupAccess|ftp_userIPs|ftp_groupIPs
ODBCColumns=ftpUserName|ftpPassword|sKey|dirHome|loginMsgFile|accessRule|disabled|sessionEncryption|dirHomeLock|hideHidden|alwaysAllowLogin|changePassword|quotaEnable|maxUsersLoginPerIP|spe edLimitUp|speedLimitDown|maxUsersConcurrent|timeOutIdle|timeOutSession|ratioUp|ratioDown|ratioCredit|quotaCurrent|quotaMax|expiration|privilege|ftpPasswordType|ratioType|groups|notes|indexNo