Port vsftpd (FTP Server) on Linux

Source: Internet
Author: User
Document directory
  • Port vsftpd (FTP Server) on Linux
Port vsftpd (FTP Server) on Linux

Just follow the README of vsftpd.
1. Download
[Url = Response
Vsftpd-2.0.6.tar.gz
2. install.
A. Unzip and enter the vsftpd-2.0.6 directory
Command: Tar zxvf vsftpd-2.0.6.tar.gz
CD vsftpd-2.0.6

B. Modify the MAKEFILE file according to your compiler.
If it is used on a PC, do not change it. Cc = gcc
I port vsftpd to the Development Office and use the arm_v5t_le-gcc compiler.
Modify: CC =/opt/mv_pro_4.0.1/montavista/Pro/devkit/ARM/v5t_le/bin/arm_v5t_le-gcc

C. If the compiler prompts that the file cannot be identified: libpam. So. O, libcap. so.1
Modify the vsf_findlibs.sh File
Modify: locate_library/lib/libpam. so.0 & Echo "/lib/libpam. so.0 ";
 
Changed to: locate_library
/Opt/mv_pro_4.0.1/montavista/Pro/devkit/ARM/v5t_le/target/lib/libpam. so.0
& Echo
"/Opt/mv_pro_4.0.1/montavista/Pro/devkit/ARM/v5t_le/target/lib/libpam. so.0 ";
Modify: locate_library/lib/libcap. so.1 & Echo "/lib/libcap. so.1 ";
 
Changed to: locate_library
/Opt/mv_pro_4.0.1/montavista/Pro/devkit/ARM/v5t_le/target/usr/lib/libcap. so.1
& Echo
"/Opt/mv_pro_4.0.1/montavista/Pro/devkit/ARM/v5t_le/target/usr/lib/libcap. so.1"

D. Make

E.
Three files may be required if you want to port to the Development Board.
 
Run/opt/mv_pro_4.0.1/montavista/Pro/devkit/ARM/v5t_le/target/usr/lib

Libcap. so.1, libreadline. so.4, libncurses. so.5 are copied to the Development Directory/workdir/filesye
/Usr/lib/
F. Copy the vsftpd executable program under the vsftpd-2.0.6 directory to/usr/sbin.
Copy the vsftpd. conf configuration file in the vsftpd-2.0.6 directory to/etc.

G. Modify the vsftpd. conf file.
Add:
Listen = Yes
Modify: # write_enable = Yes
# Anon_upload_enable = Yes
# Anon_mkdir_write_enable = Yes
Remove the preceding three items #
H. Create a directory FTP under/var/. Permission: 755
Mkfir/var/ftp
Chmod 755/var/ftp
Create a directory upload under/FTP/. Permission: 777
Mkfir/var/FTP/upload
Chmod 777/var/FTP/upload
I. Run vsftpd & and start the vsftpd background program.
In this way, an FTP server is created on the platform, and anonymous logon is performed. The/FTP directory has read-only attributes, and the/upload directory has readable and writable attributes.

J. If you want to modify the vsftpd download directory, modify vsftpd. conf.
If the/var/FTP directory is modified, change it to/opt/FTP.
Create a directory FTP under/opt/. Permission: 755
Mkfir/opt/ftp
Chmod 755/opt/ftp
Create a directory upload under/FTP/. Permission: 777
Mkfir/opt/FTP/upload
Chmod 777/opt/FTP/upload
Add a line under vsftpd. conf: anon_root =/opt/FTP.
K. vsftpd modify vsftpd. conf and restart the platform. Sometimes it seems that vsftpd does not work.
3. Test
A. Linux platform
Run the ftp ip address on another platform (the IP address is the address installed on the FTP server)
Enter the username anonymous.
Enter the password and press Enter.
Input: ls to view the Directory
Input: Get file name, which can be downloaded
Enter the mkdir directory name to create a folder.
B. Windows Platform
Enter:
[Url = ftp: // 192.168.1.104/(192.168.1.104] ftp: // 192.168.1.104/(192.168.1.104 [/url]
Is the address of the FTP server)
You can see the Directory
Download and download the flashftp Green board, click "quick connection" in the "session" menu, enter the FTP server address in "server or usl", and click "Connect ".

4. Note:
If you want to create a soft connection directory under the FTP directory. Use the Mount -- Bind Original directory to link the Directory
For example, the FTP directory/var/FTP, and a directory/opt/tmp, you want to use the/opt/tmp directory as the/var/FTP subdirectory ftptmp
Mount -- bind/opt/tmp/var/FTP/ftptmp
The access to/var/FTP/ftptmp is the access to/opt/tmp.

[B] This article is from the chinaunix blog. For more information, see [/B] [url] http://blog.chinaunix.net/u3/91211/showart_1793431.html#/url].

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.