ftp server command (Raspberry Pi)
Brief introduction
Installing the server
The first is the Raspberry Pi configuration above ftp server, execute the following command
sudo apt-get update
Update Systemsudo apt-get install vsftpd
Installationftp
Servicessudo service vsftpd start
Startftp
Servicessudo nano /etc/vsftpd.conf
Modify theftp
properties file
Server Configuration
Modify the properties file, first locate the property:
找到以下行,删除注释
anonymous_enable=NO
表示:不允许匿名访问
local_enable=YES
设定本地用户可以访问。
write_enable=YES
设定可以进行写操作
local_umask=022
设定上传后文件的权限掩码。
Modify the static ip
Modified as a static ip address, we just need to make the following settings:
- Use
sudo vim/etc/dhcpcd.conf
modify or add the following configuration items
interface <接口名字>
Specified interface
static ip_address=192.168.<需和routers相同>.?/24
static IP, and requires the router / gateway part of the same
static routers=192.168.<需和ip相同>.?
router / gateway IP address
static domain_name_servers=114.114.114.114
manually customize DNS server
after the modification is completed, restart can be modified using the complete
Comment section options
anonymous_enable=YES
Support anonymous accountlocal_enable=YES
Support local accountwrite_enable=YES
It allows any FTP can modify the file system commandlocal_umask=022
Shielded permissions local users to upload the file permissionsanon_upload_enable=YES
Allow anonymous users to upload filesanon_mkdir_write_enable=YES
Allow anonymous users to create new directoriesdirmessage_enable=YES
It allows you to display information for the directory configuration, display each directory'smessage_file
content filesxferlog_enable=YES
Turn on journalingconnect_from_port_20=YES
Port 20 using a standard connection ftpchown_uploads=YES
All anonymous users to upload your files will be changed tochown_username
chown_username=whoever
Upload your user name anonymous filexferlog_file=/var/log/xferlog
Log File Locationxferlog_std_format=YES
Using a standard logging formatidle_session_timeout=600
Idle connection timeoutdata_connection_timeout=120
Data transmission timeoutnopriv_user=ftpsecure
When the user name used to run the server when the bottomasync_abor_enable=YES
Allows the use of "async ABOR" command, generally do not, error-proneascii_upload_enable=YES
ASCII mode control is available to upload. The default value is NOascii_download_enable=YES
ASCII mode control is available for download. The default value is NOftpd_banner=Welcome to blah FTP service
Display a welcome message when login. If you set this setting is invalid banner_filedeny_email_enable=YES
If the anonymous user password is required, usebanned_email_file
the inside of the e-mail address of the user can not log inbanned_email_file=/etc/vsftpd/banned_emails
E-mail address as a password when users log in prohibiting the use of anonymouschroot_list_enable=YES
If you enable this feature, all users listed in chroot_list_file can not be changed in the root directorychroot_list_file=/etc/vsftpd/chroot_list
You can not change the definition of a user's home directory filels_recurse_enable=YES
Can you use ls -R command to prevent waste a lot of server resourceslisten=YES
Listen_port bound to the specified port, since all that is bundled with each upon are open, that is, standalone mode (stand-alone server sftpd)pam_service_name=vsftpd
Defines the name used by PAM, by default vsftpduserlist_enable=YES
If this option is enabled, userlist_deny option was only startingtcp_wrappers=YES
Support open tcp_wrappers
- Open vnc remote control may be used by
sudo raspi-config
set - After entering the ftp server, you need to define the local path, use
lcd
instructionlcd <目录>
- External devices can be
/media/pi/<设备名称>
inside looking for, you can use the path open after download files