VSFTPD is the most popular FTP server program in Linux distributions, characterized by its compact, easy-to-use, VSFTPD is also the preferred software package for FTP servers in the LXT5 architecture.
1. Cross-compiling Libcap(if needed!?)
A. Download:Https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.24.tar.gz
TAR-ZXVF libcap-2.24.tar.gz
CD libcap-2.24
B. Generating Libcap/_makenames (x86)
Make clean
Make
mv./libcap/_makenames./libcap/_makenames_x86
c. Modify Make.rules
...
Else
Prefix= (pointing to the arm compiler USR path)
exec_prefix=$ (prefix)
lib_prefix=$ (Exec_prefix)
inc_prefix=$ (prefix)
man_prefix=$ (prefix)/share
endif
...
...
CC: = ARM-ARAGO-LINUX-GNUEABI-GCC
CFLAGS: =-o2-d_largefile64_source-d_file_offset_bits=64
...
d. Modify Libcap/makefile
...
Ifeq ($ (libattr), yes)
FILES + = Cap_file
#LDFLAGS + =-lattr
#DEPS =-lattr
endif
...
...
Cap_names.h: _makenames
./_makenames_x86 > Cap_names.h
...
E. Modifying libcap/cap_file.c
...
#define XATTR_SECURITY_PREFIX "SECURITY."
#define XATTR_NAME_CAPS Xattr_security_prefix "capability"
...
F. Cross-compiling
Make clean
Make
Make install
2. Cross-compiling VSFTPD
A. Unzip
TAR-ZXVF vsftpd-3.0.2.tar.gz
CD vsftpd-3.0.2
B. Modify Makefile
...
CC = ARM-ARAGO-LINUX-GNUEABI-GCC
Install = Install
...
...
#LIBS = './vsf_findlibs.sh '
LIBS =-lcap-lpam
LINK =-wl,-s
...
...
Install:
$ (INSTALL)-d-m 755/home/vsftpd/sbin/;
$ (INSTALL)-M 755 vsftpd/home/vsftpd/sbin/vsftpd;
Clean
...
C. Cross-compiling
Make clean
Make
Make install
D. Configuration file (vsftpd.conf)
Anonymous_enable=no
Local_enable=yes
Write_enable=yes
Anon_upload_enable=yes
Anon_mkdir_write_enable=yes
Dirmessage_enable=yes
Xferlog_enable=yes
Connect_from_port_20=yes
Chown_uploads=yes
Xferlog_file=/var/log/vsftpd.log
Xferlog_std_format=yes
Async_abor_enable=yes
Ascii_upload_enable=yes
Ascii_download_enable=yes
Ftpd_banner=welcome to blah FTP service.
Ls_recurse_enable=yes
Listen=yes
3. Installation and use (ARMV7 hardware system)
A. Configuration file Installation
[Email protected]:/home#
Cp/home/vsftpd/vsftpd.conf/etc
B. Start vsftpd
[Email protected]:/home#
Mkdir/usr/share/empty
[Email protected]:/home#
/HOME/VSFTPD/SBIN/VSFTPD &
C. adding users
[Email protected]:/home#
AddUser ftptest
-passwd:123456
D. Testing
-----------FTP board_ip ([email protected])
Or
Browser: ftp://board_ip ([email protected])
(Author Feng Qinghua, embedded Studio (www.xteda.com)-CEO)
< reprint please note the name of the route >
LXT5 architecture-Embedded FTP server VSFTPD cross-compiling and configuration use (ARMV7)