ftp server command (Raspberry Pi)

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 updateUpdate System
  • sudo apt-get install vsftpdInstallation ftpServices
  • sudo service vsftpd startStart ftpServices
  • sudo nano /etc/vsftpd.confModify the ftpproperties 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.confmodify or add the following configuration items

interface <接口名字>Specified interface
static ip_address=192.168.<需和routers相同>.?/24static 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.114manually customize DNS server
after the modification is completed, restart can be modified using the complete


Comment section options

  • anonymous_enable=YES Support anonymous account
  • local_enable=YESSupport local account
  • write_enable=YESIt allows any FTP can modify the file system command
  • local_umask=022Shielded permissions local users to upload the file permissions
  • anon_upload_enable=YESAllow anonymous users to upload files
  • anon_mkdir_write_enable=YESAllow anonymous users to create new directories
  • dirmessage_enable=YESIt allows you to display information for the directory configuration, display each directory's message_filecontent files
  • xferlog_enable=YESTurn on journaling
  • connect_from_port_20=YESPort 20 using a standard connection ftp
  • chown_uploads=YESAll anonymous users to upload your files will be changed tochown_username
  • chown_username=whoeverUpload your user name anonymous file
  • xferlog_file=/var/log/xferlogLog File Location
  • xferlog_std_format=YESUsing a standard logging format
  • idle_session_timeout=600Idle connection timeout
  • data_connection_timeout=120Data transmission timeout
  • nopriv_user=ftpsecureWhen the user name used to run the server when the bottom
  • async_abor_enable=YESAllows the use of "async ABOR" command, generally do not, error-prone
  • ascii_upload_enable=YESASCII mode control is available to upload. The default value is NO
  • ascii_download_enable=YESASCII mode control is available for download. The default value is NO
  • ftpd_banner=Welcome to blah FTP service Display a welcome message when login. If you set this setting is invalid banner_file
  • deny_email_enable=YESIf the anonymous user password is required, use banned_email_filethe inside of the e-mail address of the user can not log in
  • banned_email_file=/etc/vsftpd/banned_emailsE-mail address as a password when users log in prohibiting the use of anonymous
  • chroot_list_enable=YESIf you enable this feature, all users listed in chroot_list_file can not be changed in the root directory
  • chroot_list_file=/etc/vsftpd/chroot_listYou can not change the definition of a user's home directory file
  • ls_recurse_enable=YES Can you use ls -R command to prevent waste a lot of server resources
  • listen=YESListen_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=vsftpdDefines the name used by PAM, by default vsftpd
  • userlist_enable=YESIf this option is enabled, userlist_deny option was only starting
  • tcp_wrappers=YESSupport open tcp_wrappers

  • Open vnc remote control may be used by sudo raspi-configset
  • After entering the ftp server, you need to define the local path, use lcdinstructionlcd <目录>
  • External devices can be /media/pi/<设备名称>inside looking for, you can use the path open after download files

Guess you like

Origin www.cnblogs.com/Yunrui-blogs/p/12241820.html