搭建一个FTP服务器,可以使用一些常见的工具,如FileZilla Server、vsftpd等,这里以vsftpd为例,介绍如何在安卓设备上搭建一个FTP服务器。
1、安装vsftpd
在安卓设备上安装一个终端模拟器,如Termux,然后通过Termux安装vsftpd:
pkg install vsftpd
2、配置vsftpd
配置文件位于/data/data/com.termux/files/home/.config/vsftpd
目录下,用文本编辑器打开vsftpd.conf
文件,修改以下配置:
参数 | 值 |
anonymous_enable | NO |
local_enable | Yes |
write_enable | Yes |
local_umask | 022 |
anon_upload_enable | No |
anon_mkdir_write_enable | No |
anon_other_write_enable | No |
local_root | /sdcard/Download |
listen | YES |
listen_ipv6 | NO |
pasv_min_port | 40000 |
pasv_max_port | 50000 |
pasv_address | :: |
port_enable | Yes |
port_number | 21 |
secure_chroot_dir | /var/run/vsftpd/empty |
force_dot_files | NO |
ssl_enable | NO |
allow_anon_ssl | NO |
deny_email_enable | NO |
no_anon_root | Yes |
soft_links | Yes |
hard_links | Yes |
lftp_utf8 | Yes |
ftp_user | ftpuser |
ftp_group | ftpgroup |
user_sub_token | Yes |
local_root | /sdcard/Download |
| passive_mode = yes (or no) and not bind_only; default: yes (but see below) if you want to enable passive mode, you must also specify a value for pasv_min_port and pasv_max_port. If you want to disable it, use "no". The default value is "yes". Note that passive mode is only supported on IPv4 connections. For IPv6 connections, the only option is active mode. See also pasv_address. If you want to enable passive mode, you must also specify a value for pasv_min_port and pasv_max_port. If you want to disable it, use "no". The default value is "yes". Note that passive mode is only supported on IPv4 connections. For IPv6 connections, the only option is active mode. See also pasv_address. If you want to enable passive mode, you must also specify a value for pasv_min_port and pasv_max_port. If you want to disable it, use "no". The default value is "yes". Note that passive mode is only supported on IPv4 connections. For IPv6 connections, the only option is active mode. See also pasv_address. If you want to enable passive mode, you must also specify a value for pasv_min_port and pasv_max_port. If you want to disable it, use "no". The default value is "yes". Note that passive mode is only supported on IPv4 connections. For IPv6 connections, the only option is active mode. See also pasv_address. If you want to enable passive mode, you must also specify a value for pasv_min_port and pasv_max_port. If you want to disable it, use "no". The default value is "yes". Note that passive mode is only supported on IPv4 connections. For IPv6 connections, the only option is active mode. See also pasv_address. If you want to enable passive mode, you must also specify a value for pasv_min_port and pasv_max_port. If you want to disable it, use "no". The default value is "yes". Note that passive mode is only supported on IPv4 connections. For IPv6 connections, the only option is active mode. See also pasv_address. If you want to enable passive mode, you must also specify a value for pasv_min_port and pasv_max_port. If you want to disable it, use "no". The default value is "yes". Note that passive mode is only supported on IPv4 connections. For IPv6 connections, the only option is active mode. See also pasv_address. If you want to enable passive mode, you must also specify a value for pasv_min_port and pasv_max_port. If you want to disable it, use "no". The default value is "yes". Note that passive mode is only supported on IPv4 connections. For IPv6 connections, the only option is active mode. See also pasv_address. If you want to enable passive mode, you must also specify a value for pasv_min_port and pasv_max
上一篇:域名服务器的功能有哪些?