Environment: VSFTPD - 3.0.2, hardware: OK335XS, virtual machine: ubuntu12.04 (32-bit development board bring)
(1) to modify vsf_findlibs. Sh
Shielding line 53,54,57
50 # Look for libcap (" capabilities)
51 if locate_library/lib/libcap. So. 1; Then
52 echo/lib/libcap. So. "1";
53 # elif locate_library/lib/libcap. So. 2; Then
54 # echo "/lib/libcap. So. 2".
55 the else
56 locate_library/usr/lib/libcap. So & amp; & Echo "- lcap";
57 # locate_library/lib/libcap. So & amp; & Echo "- lcap";
58 locate_library/lib64/libcap. So & amp; & Echo "- lcap";
59 fi
(2) modify the Makefile
# Makefile for systems with the GNU tools
# CC=GCC
CC=/usr/local/arm/cross/am335xt3/devkit/bin/arm - arago - Linux - gnueabi - GCC
INSTALL=INSTALL
IFLAGS=- idirafter dummyinc
# CFLAGS=- g
CFLAGS=- O2 - fPIE - fstack - protector - param=SSP - buffer - size=4 \
- the Wall - W - Wshadow Werror - Wformat ws-security \
- D_FORTIFY_SOURCE=2 \
# - pedantic - Wconversion
LIBS=`./vsf_findlibs. Sh ` lcap - lpam
The LINK=- Wl, -s
LDFLAGS=- fPIE - pie - Wl, z, relro - Wl, z, now
Save after exit the execution make
(3) executive arm - arago - Linux - gnueabi readelf - d VSFTPD indicates which need library
0 x00000001 (men) Shared library: [2] libcap. So.
0 x00000001 (men) Shared library: [libpam. So. 0]
0 x00000001 (men) Shared library: [6] libc. So.
0 x00000001 (men) Shared library: [ld - Linux. So. 3]
Copy the Shared library to/rootfs/lib, to generate VSFTPD copy to sbin directory with the file system, the VSFTPD. Conf file copy to the root of the file system/rootfs/etc directory,
(4) modify the configuration file VSFTPD. Conf
Modify the content as follows:
Anonymous_enable=YES
Write_enable=YES
Anon_upload_enable=YES
Anon_mkdir_write_enable=YES
Dirmessage_enable=YES
Connect_from_port_20=YES
Chown_uploads=YES
Chown_username=FTP
Xferlog_std_format=YES
# nopriv_user=FTP
Async_abor_enable=YES
Ascii_upload_enable=YES
Ascii_download_enable=YES
Ls_recurse_enable=YES
Listen=YES
Listen_port=21
Anon_other_write_enable=YES
(5) the development of heel file system to create the necessary directory:
The mkdir -p/var/FTP/pub
The mkdir -p/usr/share/empty
Chown root, root/var/FTP
Chmod 755/home/rootfs/var/FTP
CD/var/FTP
Chmod 777 pub
(6) to create user
The/etc/group file should have at least a root:
Root: * : 0:
The/etc/passwd file add FTP and nobody users:
0-0 at root: : : root://bin/sh:
FTP: : name: FTPUser:/var/FTP:
Nobody: * : 99-99: nobody:/:
(7) lack of libattr. So. A Shared library, need to copy to/lib;
Development board (8) to perform VSFTPD/etc/VSFTPD. Conf & amp;
Problem:
(1) virtual machine ubuntu perform FTP 192.168.0.232 display information:
Root @ ubuntu: ~ # FTP 192.168.0.232
Connected to 192.168.0.232.
220 (vsFTPd 3.0.2)
The Name (192.168.0.232: root) : FTP
331 both Please specify the password.
Password:
230 the Login successful.
The Remote system type is UNIX.
Using binary mode to transfer files.
Ftp>
Ftp>
Ftp>
Ftp>
Ftp> Ls
200 the PORT command successful. Consider using PASV.
OOPS: 500 socket
When I enter the ls command in "200 PORT command successful. Consider using PASV. OOPS: 500 socket", unable to connect the arm, there is also the xshell attempts to "500 OOPS: socket," disconnect.
This problem I tried a lot of data, Internet but hasn't been solved, hope to support and everybody and help guide, first thank you, looking forward to your reply, thank you!