1. Introduction of FTP
Before setting up FTP service, let’s first understand the FTP protocol and FTP server
- FTP: a file transfer protocol. Transfer files between the local and server.
- FTP server: supports the FTP transfer protocol. Windows generally comes with FTP, but it is not enabled by default.
There are also many FTP-related software, among which server-U, FileZilla, VsFTP and FtpServer of Apache are widely used.
Due to the need of work, we often copy files to other computers, using USB flash drive or other storage devices to copy it is easy to get viruses. For this reason, we need to set up an FTP server and put the files we need to share on the server. As long as the network is normal, it is easy to remove the files we need from the server.
Today we will introduce an open source FTP server, Apache FTPServer FTPServer is the protagonist of this time, Apache FTPServer is a 100% pure Java FTP server. FTPServer can run independently as a Windows service or as a Unix/ Linux daemon or embedded in Java applications.
Next, we take FtpServer as an example to set up FTP service.
2. Download the Apache FTPServer
Can go to the website to download: mina.apache.org/ftpserver-p… At present, the latest version is Apache FtpServer 1.1.1 Release. For the sake of stability, I downloaded version 1.0.6 here
3. Download and decompress the package
Decompress the downloaded package to the local, mine is put in the root directory of disk D, its directory structure is shown as follows:
4. Modify the configuration file
4.1 Modifying the users.properties configuration file
D:\apache-ftpserver-1.0.6\res\conf\users.properties You can add users to this configuration file. If you do not want to log in anonymously, you can comment out the configuration of anonymous users
# Password is "admin"
ftpserver.user.admin.userpassword=admin
ftpserver.user.admin.homedirectory=./res/home
ftpserver.user.admin.enableflag=true
ftpserver.user.admin.writepermission=true
ftpserver.user.admin.maxloginnumber=0
ftpserver.user.admin.maxloginperip=0
ftpserver.user.admin.idletime=0
ftpserver.user.admin.uploadrate=0
ftpserver.user.admin.downloadrate=0
ftpserver.user.anonymous.userpassword=
ftpserver.user.anonymous.homedirectory=./res/home
ftpserver.user.anonymous.enableflag=true
ftpserver.user.anonymous.writepermission=false
ftpserver.user.anonymous.maxloginnumber=20
ftpserver.user.anonymous.maxloginperip=2
ftpserver.user.anonymous.idletime=300
ftpserver.user.anonymous.uploadrate=4800
ftpserver.user.anonymous.downloadrate=4800
Password configures the new user
ftpserver.user.lxw.userpassword=123456
# home directory
ftpserver.user.lxw.homedirectory=./res/home
The current user is available
ftpserver.user.lxw.enableflag=true
# Have upload permission
ftpserver.user.lxw.writepermission=true
The maximum number of logins is 20
ftpserver.user.lxw.maxloginnumber=20
The number of users logging in with the same IP address is 2
ftpserver.user.lxw.maxloginperip=2
The idle time is 300 seconds
ftpserver.user.lxw.idletime=300
Upload rate limit is 480000 bytes per second
ftpserver.user.lxw.uploadrate=48000000
Download speed limit is 480000 bytes per second
ftpserver.user.lxw.downloadrate=48000000
Copy the code
4.2 Modifying the ftpd-typical. XML configuration file
Configuration file path: D:\apache-ftpserver-1.0.6\res\conf\ftpd-typical.xml
<server xmlns="http://mina.apache.org/ftpserver/spring/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="Http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd"
id="myServer">
<listeners>
<! -- Default port is 2121, you can change to your own port -->
<nio-listener name="default" port="2121">
<ssl>
<keystore file="./res/ftpserver.jks" password="password" />
</ssl>
</nio-listener>
</listeners>
<file-user-manager file="./res/conf/users.properties" encrypt-passwords="clear"/>
<! Encrypt-passwords ="clear" -->
</server>
Copy the code
5. Start FTPServer
Open the CMD command window, switch to the D:\apache-ftpserver-1.0.6\bin directory and enter the following command:
service install
ftpd.bat res/conf/ftpd-typical.xml
Copy the code
Note: Since FTpServer is written in pure Java, the execution of the second command requires the Java environment JAVA_HOME to be configured in the environment variable. Java environment omitted here, can not be baidu itself
After entering the command, as shown in the figure below, FtpServer started will be started successfully
6. Access to FTP
In the browser, enter ftp://ip:2121 for access. If the port is changed, change it to the corresponding port. IP is the IP address of the FTP server, as shown in the following figure:
Of course, we can also access directly through the tool, upload and download file operation to provide a relatively easy to install tools for you, you can rest assured to eat.
Winscp553 Baidu cloud download link extraction code: SNCS
7. Enable or disable FTP
So how do we start the FTP service?
- To start, go to the D: apache-ftpserver-1.0.6bin directory and type the following command:
service install
ftpd.bat res/conf/ftpd-typical.xml
Copy the code
- You can make the startup command into a bat file with the following contents:
D: CD d: \apache-ftpserver-1.0.5\bin ftpd.bat res/conf/ftpd-typical.xmlCopy the code
Bat. Click the xx.bat file to start the FTP server.
Устанавливаем FTP сервер.
Открываем всё туже чудо-папку на своём рабочем столе, а именно install_server Ищем в ней архив pablos_ftp_server_v1_52.zip Разархивируем его в папку pablos_ftp_server_v1_52 Теперь переименовываем её в ftp_server и копируем в директорию нашего сервера D:\server Получается, что теперь папка нашего сервера выглядит так:
Открываем папку ftp_server Видим:
Теперь создадим в этой директории новую папку.
И дадим ей имя access
Открываем приложение FTPServer.exe (расширение .exe будет скрыто)
Появляется такое окошко:
Щёлкаем на «Server» и выбираем «User Account Wizart…«.
Появляется окошко для создания нового пользователя для ftp сервера
В поле «Account Name» вписываем: access
Нажимаем кнопку «Далее«. Следующее, что мы видим – это вот такое окошко, тут нам предлагают ввести пароль для пользователя access
В поле «Password» и «Confirm Password» введите: password
Опять щёлкаем на «Далее«. Появляется следующее окошко, где нам предлагают выбрать папку, к которой будет иметь доступ пользователь access
В поле «Home Directory» пишем «D:/server/ftp_server/access»
Щёлкаем по кнопочку «Далее«. Появляется окошко:
В нём нам предлагают выбрать права доступа для пользователя access, т.е. выбрать те действия которые он сможет выполнять в своей папке:
Allow Download | – разрешать скачивать файлы и папки |
Allow Upload | – разрешать загружать папки и файлы |
Allow Rename | – разрешать переименовывать файлы и папки |
Allow Delete | – разрешать удалять папки и файлы |
Allow Create Directory | – разрешать создавать новые папки |
Ставим галочки напротив всех пунктов:
Опять щёлкаем на «Далее«. Появляется вот что:
Тут нам говорят, что пользователь успешно добавлен. Жмём на «Готово«. Теперь нам нужно запустит наш ftp сервер, щёлкаем на «Server«, а потом на «Start«.
Итак, ftp сервер мы удачно запустили:
Теперь сворачиваем окошко ftp сервера. В самом нижнем правом углу появляется его иконка, щёлкнув по ней пару раз левой клавишей мыши, Вы снова увидите свой ftp сервер.
Продолжение следует…
Всем удачи!
26.05.2010 —
Опубликовал: |
ms windows xp desktop
Sorry, the comment form is closed at this time.
1- download the appache server
https://mina.apache.org/ftpserver-project/downloads.html
2- Modify below things in as shown in below figure
C:\apache-ftpserver-1.1.1\apache-ftpserver-1.1.1\res\conf\users.properties
below folder will tell the FTPClien that this will be by default folder where we can do the operation
ftpserver.user.anonymous.homedirectory=C:\\Test_New
3- Make sure to add this tag inside
C:\apache-ftpserver-1.1.1\apache-ftpserver-1.1.1\res\conf\ftpd-typical.xml
<file-user-manager file=”./res/conf/users.properties” encrypt-passwords=”true”/>
This will make sure that password field which we mapped with user.properties as in encrypted mode.
3- No we are ready to connect to Apache FTP Server.
Start the server using following below command
C:\apache-ftpserver-1.1.1\apache-ftpserver-1.1.1\bin>ftpd.bat res/conf/ftpd-typical.xml
Using XML configuration file res/conf/ftpd-typical.xml…
FtpServer started
4- Connect using Filezilla or winscp. I am using WINSCP
Note:By default the user id and password for apache ftp is admin admin
Due to work needs, I have recently been exposed to FTP. Today I will introduce an open source FTP server, which is apache ftpserver, Apache FTPServer is a 100% pure Java FTP server. It is a complete and portable FTP server engine solution based on an existing open protocol. FTPServer can run independently as a Windows service or UNIX / Linux background program or embedded in the Java application.
Let’s introduce how to install Apache FTPServer in a Windows environment:
Step 1: Download Apache FTPServer
You can download: http://mina.apache.org/ftpserver-project/downloads.html Currently the latest version is apache ftpserver 1.0.6 release, I downloaded here is 1.0.6 version
Step 2: Unzip APACHE FTPSERVER
Unzip the downloaded compressed package to the local, I am placed in the D-Pan root directory, and its directory structure is shown below:
Step 3: Modify the configuration file
1. Modify D: \ Apache-ftpserver-1.0.6 \ res \ conf \ users.properties this file
In this configuration file, you can add users.
# Password is «admin»
ftpserver.user.admin.userpassword=admin
ftpserver.user.admin.homedirectory=./res/home
ftpserver.user.admin.enableflag=true
ftpserver.user.admin.writepermission=true
ftpserver.user.admin.maxloginnumber=0
ftpserver.user.admin.maxloginperip=0
ftpserver.user.admin.idletime=0
ftpserver.user.admin.uploadrate=0
ftpserver.user.admin.downloadrate=0
ftpserver.user.anonymous.userpassword=
ftpserver.user.anonymous.homedirectory=./res/home
ftpserver.user.anonymous.enableflag=true
ftpserver.user.anonymous.writepermission=false
ftpserver.user.anonymous.maxloginnumber=20
ftpserver.user.anonymous.maxloginperip=2
ftpserver.user.anonymous.idletime=300
ftpserver.user.anonymous.uploadrate=4800
ftpserver.user.anonymous.downloadrate=4800
# Password configuration new user
ftpserver.user.lxw.userpassword=123456
#Main directory
ftpserver.user.lxw.homedirectory=./res/home
# Current user available
ftpserver.user.lxw.enableflag=true
# Have uploaded rights
ftpserver.user.lxw.writepermission=true
# Maximum login user number 20
ftpserver.user.lxw.maxloginnumber=20
# 同 i i Login User Number 2
ftpserver.user.lxw.maxloginperip=2
# 空闲 时间 is 300 seconds.
ftpserver.user.lxw.idletime=300
# Upload rate limit is 480000 bytes per second
ftpserver.user.lxw.uploadrate=48000000
# 下载 速 rate limit is 480000 bytes per second
ftpserver.user.lxw.downloadrate=48000000
PS: If you don’t want to log in anonymous, you can comment out this configuration.
2. Modify D: \ Apache-ftpserver-1.0.6 \ res \ conf \ ftpd-type «\ ftpd-type
<server xmlns="http://mina.apache.org/ftpserver/spring/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd " id="myServer"> <listeners> <!-- The default port is 2121, you can modify your own port --> <nio-listener name="default" port="2121"> <ssl> <keystore file="./res/ftpserver.jks" password="password" /> </ssl> </nio-listener> </listeners> <file-user-manager file="./res/conf/users.properties" encrypt-passwords="clear"/> <!-- Add Encrypt-Passwords = "Clear" to modify the password encryption to CLEAR --> </server>
Step 4: Start FTPServer
Open the CMD command window and switch to D: \ Apache-ftpserver-1.0.6 \ bin Enter the following command:
service install
ftpd.bat res/conf/ftpd-typical.xml
Note: The execution of the second command needs to configure java_home in the environment variable, otherwise the error will be reported, Baidu itself.
The results are shown below:
PS: ftpserver start Description FTP service has been successfully successfully
Step 5: Access FTP
In the visitor, enter ftp: // ip: 2121 for access, if the port is modified, to replace the corresponding port, IP is the IP of the server where the FTP is located, and the access is shown below:
Step 6: FTPSERVER starts and close
If the DOS command line is turned off, the FTP service stops. Therefore, it is necessary to make the startup of the fourth step into a BAT file, and the content is:
d: cd D:\apache-ftpserver-1.0.5\bin ftpd.bat res/conf/ftpd-typical.xml
Just start a name XX, name XX.bat, click to start the FTP server.
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Sign up
Appearance settings