CN106686035A - Method and device for achieving FTP server based on Apache FtpServer - Google Patents

Method and device for achieving FTP server based on Apache FtpServer Download PDF

Info

Publication number
CN106686035A
CN106686035A CN201510762694.7A CN201510762694A CN106686035A CN 106686035 A CN106686035 A CN 106686035A CN 201510762694 A CN201510762694 A CN 201510762694A CN 106686035 A CN106686035 A CN 106686035A
Authority
CN
China
Prior art keywords
user
information
file
resettlement
catalogue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510762694.7A
Other languages
Chinese (zh)
Other versions
CN106686035B (en
Inventor
温树庭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201510762694.7A priority Critical patent/CN106686035B/en
Publication of CN106686035A publication Critical patent/CN106686035A/en
Application granted granted Critical
Publication of CN106686035B publication Critical patent/CN106686035B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for achieving an FTP server based on an Apache FtpServer. Users can be managed in a precise manner through configuration, historically uploaded files can be filed to achieve fault recovery and it can be achieved that files are issued through broadcasting and requirements of multiuse downloading are met. The method comprises steps of finishing configuration information and storing the information into a database; after monitoring that a user event occurs, executing corresponding operation according to configuration information read from the database; and storing information of the user event and processes and results of the operation into a log list, thereby facilitating further analysis.

Description

Realize customizing the method and device of ftp server based on Apache FtpServer
Technical field
The present invention relates to field of computer technology, particularly a kind of to realize customizing the method and device of ftp server based on Apache FtpServer.
Background technology
FTP Server Ftp servers are a kind of special computers for specializing in other computer retrieval files and storage.In TCP/IP networks, client computer can download file or to transmitting file on file server by FTP FTP (File Transport Protocol) from file server, to realize resource-sharing, user can be connected the computer of oneself with the server of all operation File Transfer Protocol all over the world by the agreement, a large amount of programs and information in access server.FTP Server have become a kind of valuable source on internet.
Traditional ftp server realizes principle schematic as shown in figure 1, mainly realizing that step is as follows:
1. FTP service running environment is installed on the server;
2. user is created on ftp server, is that user distributes authority and arranges root;
3. the user for being assigned with authority is authenticated according to the configuration on server, and after authentication success files passe or down operation are performed.
As shown in Fig. 2 being the multi-user operation situation schematic diagram of traditional ftp server.The network bandwidth of ftp server is limited; e.g. fixed 10M; in the case of multi-user operation; no matter upload and download and be required to take certain bandwidth; bandwidth obstruction is likely to result in if user's upload or downloading rate is not provided with; cause ftp server service exception or drag the efficiency of service of slow ftp server, decline service quality.However, this is only the operational circumstances of modal ftp server, traditional ftp server is with the following drawback that due to service mode fixed single:
1. traditional ftp server configurability is limited, can not such as control upload or the downloading rate of user, and user etc. is freezed in setting time;
2. traditional ftp server does not possess customized development ability, it is impossible to complete customization demand, such as broadcast is issued the documents, file resettlement, behavior of archive and tracking user etc..
In summary, traditional ftp server can not meet the demand of user's precision control and customized development.Accordingly, it would be desirable to be based on extendible ftp server realize the ftp server of customizable to enrich function.
It has been investigated that, Apache FtpServer are a kind of extendible ftp servers.The basic module of Apache FtpServer and traditional ftp server functional similarity, in addition Apache FtpServer are also with the function of the upload and download rate that can control user.And Apache FtpServer are the ftp server software of increasing income of pure Java, it is developed using MINA network frames, with extraordinary performance, the function that can realize customizing by extending the source code of Apache FtpServer.
Therefore, the present invention is the shortcomings and deficiencies for prior art, there is provided a kind of to realize customizing the method and device of ftp server based on Apache FtpServer.Because Apache FtpServer have good autgmentability, therefore can realize freezing user in setting time by expanded configuration information, and carry out Function Extension to realize some demands for customizing, for example:Broadcast is issued the documents, file resettlement, behavior etc. of archive and tracking user.
The content of the invention
In view of this, the present invention provides a kind of solution of Extended-FTP server allocative abilities and the method that can track ftp file interaction.Specifically, the present invention provides a kind of method and device that customization ftp server is realized based on Apache FtpServer, can be by configuring come precise management user, for example, freeze user, the behavior of tracking user in setting time, accomplish that user right is isolated, and will be filed to realize fault recovery transmitting file in history, while can also realize that broadcast is issued the documents, meet the demand of multi-user's download.
For achieving the above object, according to an aspect of the invention, there is provided a kind of method for realizing customizing ftp server based on Apache FtpServer.
A kind of method for realizing customizing ftp server based on Apache FtpServer, including:Complete configuration information and be saved in database;After customer incident generation is listened to, corresponding operation is performed according to the configuration information read from the database;The information of the customer incident and the process and result of the operation are saved in log sheet, so as to further analysis.
Alternatively, the configuration information includes:User basic information, file resettlement information, archive information and file clean-up information.
Alternatively, the user basic information includes user's freezing information, the file resettlement information includes that file moves catalogue, and the archive information includes archive catalogue, and the file clean-up information includes timed task title, timing expression formula and catalogue for clearance.
Alternatively, also include:Timed task is set, according to the file clean-up information come the expired archive file of periodic cleaning, and implementation procedure is recorded in the log sheet.
Alternatively, also include:By analyzing the log sheet, the legitimacy of user is judged according to judgment rule set in advance, and disabled user is set to into frozen state.
Alternatively, after customer incident generation is listened to, performing corresponding operation according to the configuration information read from the database includes:After the event of User logs in is listened to, the user basic information is read from the database, and user is authenticated;After listening to user and starting to upload or start the event downloaded, the user basic information is read from the database, and judge user whether in frozen state;After the event that user's upload is completed is listened to, the file resettlement information is read from the database, and the file resettlement for uploading is moved under catalogue to the file;After the event that user's download is completed is listened to, the archive information is read from the database, and by the file resettlement downloaded under the archive catalogue.
Alternatively, the file resettlement catalogue includes one or more.
According to a further aspect in the invention, there is provided a kind of to realize customizing the device of ftp server based on Apache FtpServer.
It is a kind of to realize customizing the device of ftp server based on Apache FtpServer, including:Information collocation module, for completing configuration information and being saved in database;Performing module is monitored, for after customer incident generation is listened to, according to the configuration information read from the database corresponding operation being performed;Logger module, for the information of the customer incident and the process and result of the operation to be saved in log recording table, so as to further analysis.
Alternatively, the configuration information includes:User basic information, file resettlement information, archive information and file clean-up information.
Alternatively, the user basic information includes user's freezing information, the file resettlement information includes that file moves catalogue, and the archive information includes archive catalogue, and the file clean-up information includes timed task title, timing expression formula and catalogue for clearance.
Alternatively, also include:Timed task module, for according to the file clean-up information come the expired archive file of periodic cleaning, and by implementation procedure record in the log sheet.
Alternatively, also include:Log analysis module, for by the analysis log sheet, the legitimacy of user being judged according to judgment rule set in advance, and is set to frozen state by disabled user.
Alternatively, the monitoring performing module is additionally operable to:After the event of User logs in is listened to, the user basic information is read from the database, and user is authenticated;After listening to user and starting to upload or start the event downloaded, the user basic information is read from the database, and judge user whether in frozen state;After the event that user's upload is completed is listened to, the file resettlement information is read from the database, and the file resettlement for uploading is moved under catalogue to the file;After the event that user's download is completed is listened to, the archive information is read from the database, and by the file resettlement downloaded under the archive catalogue.
Alternatively, the file resettlement catalogue includes one or more.
Technology according to the present invention scheme, based on the basic module of Apache FtpServer, by extending the configuration information of Apache FtpServer user property is enriched, it is possible to achieve the operation of user can control, and carry out precise management user.Arrange based on the monitor of case mechanism realization to receive event and complete subsequent operation, it is possible to achieve the resettlement of file, so as to user right be isolated, it is to avoid file destroyed problem caused by file operation is changed disorderly between user;Can also realize that broadcast is issued the documents simultaneously, meet the demand of multi-user's download;Furthermore it is also possible to document is filed, to realize fault recovery.In addition, the process and result of operation are stored in be analyzed in daily record, user behavior can be tracked by interactive log, solving traditional FTP user can not tracking problem, can also user behavior as according to distributing rationally, can the larger performance for improving ftp server.
Description of the drawings
Accompanying drawing does not constitute inappropriate limitation of the present invention for more fully understanding the present invention.Wherein:
Fig. 1 is that traditional ftp server realizes principle schematic;
Fig. 2 is the multi-user operation situation schematic diagram of traditional ftp server;
Fig. 3 is the key step schematic diagram of the method that customization ftp server is realized based on Apache FtpServer according to embodiments of the present invention;
Fig. 4 is the main modular schematic diagram of the device that customization ftp server is realized based on Apache FtpServer according to embodiments of the present invention;
Fig. 5 is the operation principle schematic diagram of the customization ftp server of the embodiment of the present invention;
Fig. 6 is the circuit theory schematic diagram of the customization ftp server of the embodiment of the present invention;
Fig. 7 is that the customization ftp server of the embodiment of the present invention realizes schematic diagram;
Fig. 8 is the realization mechanism schematic diagram of the monitor submodule of the embodiment of the present invention;
Fig. 9 is the process sequential chart of the User logs in event of the embodiment of the present invention;
Figure 10 is the process sequential chart that the user of the embodiment of the present invention starts upload event;
Figure 11 is the process sequential chart that the user of the embodiment of the present invention uploads the event that completes;
Figure 12 is the process sequential chart that the user of the embodiment of the present invention starts download event;
Figure 13 is the process sequential chart that the user of the embodiment of the present invention downloads the event that completes;
Figure 14 is the monitoring activity schematic diagram of the monitor submodule of the embodiment of the present invention;
Figure 15 is the implementation procedure sequential chart of the timed task module of the embodiment of the present invention;
Figure 16 is the implementation process schematic diagram that user behavior is tracked by log analysis of the embodiment of the present invention.
Specific embodiment
Below in conjunction with accompanying drawing to the present invention one exemplary embodiment explain, including the embodiment of the present invention various details to help understanding, they should be thought only exemplary.Therefore, it will be appreciated by those of ordinary skill in the art that, various changes and modifications can be made to the embodiments described herein, without departing from scope and spirit of the present invention.Equally, for clarity and conciseness, the description to known function and structure is eliminated in description below.
The customization ftp server of the present invention is based on the basic module of Apache FtpServer, Extended-FTP server allocative abilities and tracking ftp file interaction are realized by extending Apache FtpServer, for example, configuration attribute, subscription authentication and operation trace record etc. is enriched.
Fig. 3 is the key step schematic diagram of the method that customization ftp server is realized based on Apache FtpServer according to embodiments of the present invention.As shown in figure 3, the present invention's realizes that the method for customizing ftp server mainly includes steps S31 to step S33 based on Apache FtpServer.
Step S31:Complete configuration information and be saved in database.The configuration information includes:User basic information, file resettlement information, archive information and file clean-up information.Wherein, the user basic information includes user's freezing information etc., the file resettlement information includes that file moves catalogue, and the archive information includes archive catalogue, and the file clean-up information includes the contents such as timed task title, timing expression formula and catalogue for clearance.
Step S32:After customer incident generation is listened to, corresponding operation is performed according to the configuration information read from the database.Wherein, according to the difference of customer incident, following several operations can be included:
Operation 1:After the event of User logs in is listened to, the user basic information is read from the database, and user is authenticated;
Operation 2:After listening to user and starting to upload or start the event downloaded, the user basic information is read from the database, and judge user whether in frozen state;
Operation 3:After the event that user's upload is completed is listened to, the file resettlement information is read from the database, and the file resettlement for uploading is moved under catalogue to the file;
Operation 4:After the event that user's download is completed is listened to, the archive information is read from the database, and by the file resettlement downloaded under the archive catalogue.
Technology according to the present invention scheme, the file resettlement catalogue includes one or more.
Step S33:The information of the customer incident and the process and result of the operation are saved in log sheet, so as to further analysis.
Knowable to implementation process of the invention, timed task can also be set, according to the file clean-up information come the expired archive file of periodic cleaning, and implementation procedure is recorded in the log sheet.
In addition, the present invention can also judge the legitimacy of user according to judgment rule set in advance by the analysis log sheet, and disabled user is set to into frozen state.
Fig. 4 is the main modular schematic diagram of the device that customization ftp server is realized based on Apache FtpServer according to embodiments of the present invention.As shown in figure 4, the present invention's realizes that the device 40 for customizing ftp server mainly includes information collocation module 41, monitors performing module 42 and logger module 43 based on Apache FtpServer.
Information collocation module 41 is used to complete configuration information and be saved in database;Monitoring performing module 42 is used to after customer incident generation is listened to, according to the configuration information read from the database corresponding operation is performed;Logger module 43 is used to that the information of the customer incident and the process and result of the operation to be saved in log recording table, so as to further analysis.
Of the invention to realize principle, the configuration information includes:User basic information, file resettlement information, archive information and file clean-up information.Wherein, the user basic information includes user's freezing information etc., the file resettlement information includes that file moves catalogue, and the archive information includes archive catalogue, and the file clean-up information includes timed task title, timing expression formula and catalogue for clearance.In addition, heretofore described file resettlement catalogue can include one or more.
Monitor performing module 42 to can be also used for after the event of User logs in is listened to, the user basic information being read from the database, and user is authenticated;After listening to user and starting to upload or start the event downloaded, the user basic information is read from the database, and judge user whether in frozen state;After the event that user's upload is completed is listened to, the file resettlement information is read from the database, and the file resettlement for uploading is moved under catalogue to the file;After the event that user's download is completed is listened to, the archive information is read from the database, and by the file resettlement downloaded under the archive catalogue.
In addition, the present invention's realizes that the device 40 for customizing ftp server can also include timed task module based on Apache FtpServer, for according to the file clean-up information come the expired archive file of periodic cleaning, and by implementation procedure record in the log sheet;And log analysis module, for by the analysis log sheet, the legitimacy of user being judged according to judgment rule set in advance, and disabled user is set to into frozen state.
The implementation process of the present invention will be introduced by specific embodiment below.Fig. 5 to Figure 16 is the specific implementation process of embodiments of the invention.Fig. 5 is the operation principle schematic diagram of the customization ftp server of the embodiment of the present invention.As shown in Figure 5, the ftp server that customizes of the present invention is different from traditional ftp server, upload user is not used in download file, only it is responsible for uploading files to assigned catalogue (shown in label 1), ftp server system can be file resettlement to download directory (shown in label 2), it can also be multiple that wherein download directory can be one, realize that point-to-point download and broadcast mode are downloaded respectively;Similarly, download user to be served only for downloading file.After the completion of file download, ftp server system can be the file resettlement under download directory to filing catalogue (shown in label 3).
According to operation principle as above, the customization ftp server of the present invention can avoid of the prior art because user right does not accomplish isolation, may result in that file operation between user is chaotic so that the destroyed situation of file occurs;In addition, file can move multiple download directories, realize broadcast and issue the documents;Also, solve the problems, such as that abnormal document recovers by archive.
As shown in fig. 6, being the circuit theory schematic diagram of the customization ftp server of the embodiment of the present invention.Due to the function and traditional ftp server functional similarity of Apache FtpServer basic modules, increase only and upload and download the function of file speed control, so FTP basic modules part is eliminated in figure.It can be seen that compared with traditional ftp server, the customization ftp server of the present invention can also include FTP function expanding modules and FTP visualization tracking modules.
FTP function expanding modules can include core configuration submodule, monitor submodule and timed task submodule again according to the sequencing of functional realiey.Core configuration submodule is used for the configuration attribute of the customization demand of Extended-FTP, the main monitoring users of monitor submodule operate and perform the tasks such as corresponding file resettlement, filing, timed task submodule is mainly responsible for being cleared up expired archive file, to ensure that ftp server has enough spaces as user service.
FTP visualization tracking modules are mainly used in preserving monitor submodule and the interactive log during timed task submodule functional realiey, and for further analysis, to solve the not traceable problem of traditional ftp server user, while core configuration information can be optimized.
Fig. 7 is that the customization ftp server of the embodiment of the present invention realizes schematic diagram.As shown in fig. 7, mainly including 4 modules in the present embodiment, it is shown in figure with digital 1-4 respectively.Hereinafter will be described in detail modules realizes process.
1st, core configuration submodule
The module is mainly used in configuring the necessary information of each functional realiey, and wherein configuration information mainly includes 3 parts:
1.1 user basic informations, wherein, including the attribute whether user freezes, i.e. user's freezing information, this is the user basic information newly increased according to functional realiey demand, serves primarily in monitor submodule and timed task submodule;
1.2 files move information and archive information, serve primarily in monitor submodule;
1.3 file clean-up information, serve primarily in timed task submodule.
As shown in Figure 7, whether can need whether backup and file backup catalogue, file need the information such as filing and archive catalogue with configuration file in core configuration submodule, it is point-to-point resettlement or distribution resettlement when can be moved with configuration file, file clean-up can also be configured simultaneously, such as configuration of timed task rule and catalogue for clearance etc., wherein timed task rule mainly include timed task title, timing expression formula etc..
It is apparent to show, the original FTP_USER attributes of Apache FtpServer are listed in table 1;The extended attribute of FTP_USER is listed in table 2, including:Whether user freezes, file moves catalogue and archive catalogue;Timed task configuration attribute is listed in table 3, mainly includes timed task title, timing expression formula and catalogue for clearance.Wherein, the original FTP_USER attributes of Apache FtpServer in whether user listed in table 2 freezes attribute information and table 1 have collectively constituted user basic information.
The original FTP_USER attributes of the Apache FtpServer of table 1
userid User
userpassword User cipher
homedirectory Root
enableflag User's serviceable indicia
writepermission Whether writeable mark
idletime Free time
uploadrate Upper transmitting file speed
downloadrate Download file speed
maxloginnumber User is maximum to log in number
maxloginperip Each ip is maximum to log in number
sourceip Source IP address
The FTP_USER extended attributes of table 2
frozen Whether user freezes
goaldirectory File moves catalogue
backdirectory Archive catalogue
The timed task configuration attribute of table 3
task_Name Timed task title
CRON_EXPRESSION Timing expression formula
clear_director Catalogue for clearance
By way of Apache FtpServer are providing interface, the parameter information of user can be easily set, and configuration information is saved in database.User basic information can be just obtained in User logs in for authentication, after User logs in, monitor submodule can be in the extended attribute of user user's freezing information it is whether on hold limiting the whether operable file of user to judge the user, for example upload or download file etc..
Additionally, for the freezing information of user is arranged more flexibly, and the freeze-off time of user can also be arranged.For example, can arrange whether high frequency user freezes to operate in special time period limiting user, until resource utilization is relatively low, then high frequency user is set freeze failure, can operate.
2nd, monitor submodule
Monitor submodule is mainly used in monitoring users and operates and perform the operations such as corresponding file resettlement, filing, and the process and result of operation are recorded in log sheet.Monitor submodule realized based on case mechanism, and monitor receives event and completes corresponding subsequent operation after event triggering, the realization mechanism schematic diagram of the monitor submodule of the embodiment of the present invention as shown in Figure 8.When monitor submodule listen to User logs in ftp server, user start to upload either upload complete event, user start to download or download complete event after, by reception event and complete subsequent operation.In addition, monitor submodule also provides extension monitors interface for the new customer incident of extension monitoring.Below by taking these conventional customer incidents as an example, the functional realiey of the submodule is discussed in detail.
As shown in figure 9, being the process sequential chart of the User logs in event of the embodiment of the present invention.After monitor submodule listens to the event of User logs in, will be according to the user name loading user basic information, and call authentication procedure to be authenticated, and the event information of User logs in and monitor submodule are write into authentication daily record to the loading result and authenticating result of user basic information.
As shown in Figure 10, it is that the user of the embodiment of the present invention starts the process sequential chart of upload event.After monitor submodule listens to user starts the event for uploading, user basic information will first be loaded, and whether the user's freezing information detection user in user basic information is in frozen state, when user is not frozen, the upload track of user is write into log sheet, for keeping track of the upload frequencies of user.
Figure 11 is the process sequential chart that the user of the embodiment of the present invention uploads the event that completes.After monitor submodule listens to user uploads the event for completing, user basic information, file resettlement information will first be loaded, find the storage root of file by the configuration of user basic information again, information is moved by file and finds file resettlement catalogue, then document is moved in default one or more download directory, and the result of resettlement is write into log sheet.Herein, file resettlement catalogue determines according to the catalogue that can be used to download for pre-setting.
Figure 12 is the process sequential chart that the user of the embodiment of the present invention starts download event.After monitor submodule listens to user starts the event downloaded, user basic information will first be loaded, and whether the user's freezing information detection user in user basic information is in frozen state, when user is not frozen, the download track of user is write into log sheet, for tracking the download frequency of user.
Figure 13 is the process sequential chart that the user of the embodiment of the present invention downloads the event that completes.After monitor submodule listens to user downloads the event for completing, user basic information and archive information will first be loaded, find the storage root of file by user basic information again, archive catalogue is found by archive information, then archive function is called document resettlement to be arrived under filing catalogue, and will filing result write log sheet.
Can be seen that monitor module based on case mechanism to realize by the sequential chart that processes of the customer incident of above-mentioned Fig. 9 to Figure 13, monitor receives event and completes corresponding subsequent operation after event triggering.Below by taking upper transmitting file after User logs in as an example, the monitoring activity figure of monitor submodule is introduced.As shown in figure 14, be the embodiment of the present invention monitor submodule monitoring activity schematic diagram.When FTP user logs in ftp server, User logs in event will be triggered, and the event will be notified into the login monitoring unit of monitor submodule, and then be logged in monitoring unit and authenticated according to user basic information, after authentication passes through, user will perform the operation of files passe.First it is that user's triggering starts to upload file event, and notifies the upload monitoring unit of monitor submodule, question paper uploads and uploads monitoring unit after completing and move device according to configuration information circular document, by file resettlement under corresponding catalogue.Thus, being capable of achieving the purpose that subsequent operation is performed by monitor submodule.
3rd, timed task submodule
Timed task submodule is used to clear up expired archive file, and herein, the catalogue for clearance of timed task is archive catalogue.Timed task submodule files catalogue by way of setting timed task come scanning file, when scanning to file storage time is more than setting time (such as one month), this document is just deleted, FTP disk spaces are discharged, it is ensured that it is user service that ftp server there are enough spaces.The implementation procedure sequential of the timed task submodule of the embodiment of the present invention is as shown in figure 15.Timed task submodule to load timed task rule, afterwards, you can whether verification file can be cleared up, calls cleaning Documents Logical to complete the cleaning of scratch file by the file clean-up information in loading configuration information if it can clear up.Wherein, timed task rule mainly includes timed task title, timing expression formula etc., and the information such as file time-to-live (being defaulted as one month) can be for example included in timing expression formula.Timed task submodule, after loading timed task rule, travels through the All Files under catalogue for clearance, if the file time-to-live exceedes the file time-to-live of setting, this document is cleared up, to reach the effect of cleaning scratch file.Furthermore it is also possible to be arranged as required to important history file carry out dumping to other disk spaces etc..
4th, FTP visualizations tracking module
FTP visualization tracking modules include diary record system and Log Analysis System, diary record system is mainly used in the process and result of the operation for preserving the information and monitor submodule execution of customer incident, and Log Analysis System is used for the daily record data to preserving and is analyzed.User behavior can be tracked by interactive log, solve traditional ftp server user can not tracking problem, for example:User logs in number of times can be tracked by the log recording in log sheet and operation file track has been completed finding whether file uploads;Whether file moves download directory;Download whether user completes to download;Whether file is filed, as shown in table 4.Reset user basic information to distribute rationally as foundation at the same time it can also user behavior.For example, by analyzing log sheet, the legitimacy of user can be judged according to judgment rule set in advance, and disabled user is set to into frozen state.Herein, judgment rule can be formulated according to concrete business demand, judgment rule for example can be to upload file type, user according to the operation trace of user, user to upload file format etc., whether the behavior to judge user is legal, if disabled user, then its operation can be limited for frozen state by arranging user.
The log sheet example of table 4
Figure 16 is the implementation process schematic diagram that user behavior is tracked by log analysis of the embodiment of the present invention.The behavior of user is analyzed by taking the operation trace of user as an example.As shown in figure 16, the working condition of whole ftp server is divided into into two kinds of configuration status and running status.In configuration status, keeper passes through log analysis user operation track (step S161), limited with predetermined operating frequency according to the operating frequency of user and be compared, whether can determine whether the operating frequency of user transfinites (step S162), if transfinited, it is then disabled user, is otherwise validated user.If user is validated user, state setting need not be carried out, if user is disabled user, setting user is frozen state (step S163) and is saved in configuration information.In running status, configuration information (step S164) will be loaded during User logs in, when user needs the operation for being uploaded or being downloaded, first judge user whether in frozen state (step S165), if user is non-frozen state, upload or the down operation (step S166) of user are not limited;Otherwise, when user is frozen state, upload or the down operation (step S167) of user will be limited.
The above is the principle and specific implementation process of the embodiment of the present invention.Technical scheme according to embodiments of the present invention, based on the basic module of Apache FtpServer, by extending the configuration information of Apache FtpServer user property is enriched, it is possible to achieve the operation of user can control, and carry out precise management user.Arrange based on the monitor of case mechanism realization to receive event and complete subsequent operation, it is possible to achieve the resettlement of file, so as to user right be isolated, it is to avoid file destroyed problem caused by file operation is changed disorderly between user;Can also realize that broadcast is issued the documents simultaneously, meet the demand of multi-user's download;Furthermore it is also possible to document is filed, to realize fault recovery.In addition, the process and result of operation are stored in be analyzed in daily record, user behavior can be tracked by interactive log, solving traditional FTP user can not tracking problem, can also user behavior as according to distributing rationally, can the larger performance for improving ftp server.
Above-mentioned specific embodiment, does not constitute limiting the scope of the invention.Those skilled in the art are it is to be understood that depending on design requirement and other factors, can occur various modifications, combination, sub-portfolio and replacement.Any modification made within the spirit and principles in the present invention, equivalent and improvement etc., should be included within the scope of the present invention.

Claims (14)

1. it is a kind of based on Apache FtpServer realize customize ftp server method, its It is characterised by, including:
Complete configuration information and be saved in database;
After customer incident generation is listened to, according to the configuration information read from the database Perform corresponding operation;
The information of the customer incident and the process and result of the operation are saved in into log sheet In, so as to further analysis.
2. method according to claim 1, it is characterised in that the configuration information includes: User basic information, file resettlement information, archive information and file clean-up information.
3. method according to claim 2, it is characterised in that the user basic information Including user's freezing information, the file resettlement information includes that file moves catalogue, the file Archive information include archive catalogue, the file clean-up information include timed task title, Timing expression formula and catalogue for clearance.
4. method according to claim 1 and 2, it is characterised in that also include:
Timed task is set, according to the file clean-up information come the expired filing text of periodic cleaning Part, and implementation procedure is recorded in the log sheet.
5. method according to claim 1, it is characterised in that also include:
By analyzing the log sheet, the conjunction of user is judged according to judgment rule set in advance Method, and disabled user is set to into frozen state.
6. method according to claim 2, it is characterised in that when listening to customer incident After generation, performing corresponding operation according to the configuration information read from the database includes:
After the event of User logs in is listened to, the user is read from the database basic Information, and user is authenticated;
After listening to user and starting to upload or start the event downloaded, read from the database The user basic information is taken, and judges user whether in frozen state;
After the event that user's upload is completed is listened to, the file is read from the database Resettlement information, and by under the file resettlement for uploading to file resettlement catalogue;
After the event that user's download is completed is listened to, the file is read from the database Archive information, and by the file resettlement downloaded under the archive catalogue.
7. the method according to claim 3 or 6, it is characterised in that the file resettlement Catalogue includes one or more.
8. it is a kind of to realize customizing the device of ftp server based on Apache FtpServer, its It is characterised by, including:
Information collocation module, for completing configuration information and being saved in database;
Performing module is monitored, for after customer incident generation is listened to, according to from the data The configuration information read in storehouse performs corresponding operation;
Logger module, for by the process of the information of the customer incident and the operation It is saved in log recording table with result, so as to further analysis.
9. device according to claim 8, it is characterised in that the configuration information includes: User basic information, file resettlement information, archive information and file clean-up information.
10. device according to claim 9, it is characterised in that the user believes substantially Breath includes user's freezing information, and the file resettlement information includes that file moves catalogue, the text Part archive information include archive catalogue, the file clean-up information include timed task title, Timing expression formula and catalogue for clearance.
11. devices according to claim 8 or claim 9, it is characterised in that also include:
Timed task module, for being returned come periodic cleaning is expired according to the file clean-up information Files, and implementation procedure is recorded in the log sheet.
12. devices according to claim 8, it is characterised in that also include:
Log analysis module, for by the analysis log sheet, according to judgement set in advance Disabled user is set to frozen state judging the legitimacy of user by rule.
13. devices according to claim 9, it is characterised in that the monitoring performs mould Block is additionally operable to:
After the event of User logs in is listened to, the user is read from the database basic Information, and user is authenticated;
After listening to user and starting to upload or start the event downloaded, read from the database The user basic information is taken, and judges user whether in frozen state;
After the event that user's upload is completed is listened to, the file is read from the database Resettlement information, and by under the file resettlement for uploading to file resettlement catalogue;
After the event that user's download is completed is listened to, the file is read from the database Archive information, and by the file resettlement downloaded under the archive catalogue.
14. devices according to claim 10 or 13, it is characterised in that the file Resettlement catalogue includes one or more.
CN201510762694.7A 2015-11-10 2015-11-10 Method and device for realizing customized FTP server based on Apache FtpServer Active CN106686035B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510762694.7A CN106686035B (en) 2015-11-10 2015-11-10 Method and device for realizing customized FTP server based on Apache FtpServer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510762694.7A CN106686035B (en) 2015-11-10 2015-11-10 Method and device for realizing customized FTP server based on Apache FtpServer

Publications (2)

Publication Number Publication Date
CN106686035A true CN106686035A (en) 2017-05-17
CN106686035B CN106686035B (en) 2020-11-24

Family

ID=58864763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510762694.7A Active CN106686035B (en) 2015-11-10 2015-11-10 Method and device for realizing customized FTP server based on Apache FtpServer

Country Status (1)

Country Link
CN (1) CN106686035B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213100A (en) * 2019-06-03 2019-09-06 杭州安恒信息技术股份有限公司 A kind of disaster recovery method of configuration data, device, equipment and readable storage medium storing program for executing
CN111796985A (en) * 2020-07-08 2020-10-20 北京首汽智行科技有限公司 Database operation log uploading method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101231647A (en) * 2007-01-26 2008-07-30 鸿富锦精密工业(深圳)有限公司 File management system and method
CN102571476A (en) * 2010-12-27 2012-07-11 中国银联股份有限公司 Method and device for monitoring terminal command line in real time
CN103188325A (en) * 2011-12-31 2013-07-03 上海百事通信息技术有限公司 Operator file transfer protocol (FTP) document processing system
CN103501241A (en) * 2013-09-18 2014-01-08 华为技术有限公司 Method, device and system for cleaning useless files
CN104980401A (en) * 2014-04-09 2015-10-14 北京亿赛通科技发展有限责任公司 Secure data storage system and secure data storage and reading method of NAS server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101231647A (en) * 2007-01-26 2008-07-30 鸿富锦精密工业(深圳)有限公司 File management system and method
CN102571476A (en) * 2010-12-27 2012-07-11 中国银联股份有限公司 Method and device for monitoring terminal command line in real time
CN103188325A (en) * 2011-12-31 2013-07-03 上海百事通信息技术有限公司 Operator file transfer protocol (FTP) document processing system
CN103501241A (en) * 2013-09-18 2014-01-08 华为技术有限公司 Method, device and system for cleaning useless files
CN104980401A (en) * 2014-04-09 2015-10-14 北京亿赛通科技发展有限责任公司 Secure data storage system and secure data storage and reading method of NAS server

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213100A (en) * 2019-06-03 2019-09-06 杭州安恒信息技术股份有限公司 A kind of disaster recovery method of configuration data, device, equipment and readable storage medium storing program for executing
CN110213100B (en) * 2019-06-03 2022-04-08 杭州安恒信息技术股份有限公司 Disaster recovery method, device and equipment for configuration data and readable storage medium
CN111796985A (en) * 2020-07-08 2020-10-20 北京首汽智行科技有限公司 Database operation log uploading method
CN111796985B (en) * 2020-07-08 2023-11-17 北京首汽智行科技有限公司 Database operation log uploading method

Also Published As

Publication number Publication date
CN106686035B (en) 2020-11-24

Similar Documents

Publication Publication Date Title
US10873629B2 (en) System and method of implementing an object storage infrastructure for cloud-based services
US10824525B2 (en) Distributed data monitoring device
US9276959B2 (en) Client-configurable security options for data streams
US9794135B2 (en) Managed service for acquisition, storage and consumption of large-scale data streams
JP6571202B2 (en) System and method for automatic cloud-based full data backup and restore on mobile devices
US20100030791A1 (en) Systems and methods for power aware data storage
CN108390907B (en) Management monitoring system and method based on Hadoop cluster
CN101964795A (en) Log collecting system, log collection method and log recycling server
CN103533058A (en) HDFS (Hadoop distributed file system)/Hadoop storage cluster-oriented resource monitoring system and HDFS/Hadoop storage cluster-oriented resource monitoring method
CN108092936A (en) A kind of Host Supervision System based on plug-in architecture
JP2001306511A (en) Method and device for collecting machine information, and recording medium therefor
US11018962B2 (en) Serving a network resource usage file
CN110233893B (en) Method and system for efficiently updating server file based on ansable
CN102799609A (en) Data acquisition method based on data monitoring
CN100372307C (en) Method for managing system log
CN106686035A (en) Method and device for achieving FTP server based on Apache FtpServer
US9922539B1 (en) System and method of telecommunication network infrastructure alarms queuing and multi-threading
CN111048164A (en) Medical big data long-term storage system
US20070294255A1 (en) Method and System for Distributing Data Processing Units in a Communication Network
CN110620798A (en) Control method, system, equipment and storage medium for FTP connection
CN107783891A (en) A kind of method and server of collection nginx daily records
CN112417050A (en) Data synchronization method and device, system, storage medium and electronic device
JP4911061B2 (en) Management system, history information storage method, and data structure of history information database
CN104077525A (en) Method for processing terminal data information
CN114490516A (en) File system processing method, recycle bin management method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant