Linux-based FTP scripts:
1#!/bin/SH2 3 4 CD5Echo"completely uninstall the original FTP"6sudo apt-GetRemove--purge vsftpd # (--purge option means complete removal of software and related files)7 8Echo"Installing the VSFTPD server"9sudo apt-GetInstall VSFTPDTen OneEcho"configuration file" A #匿名访问 -sudo sed-i-E's|anonymous_enable=yes|anonymous_enable=no|'/etc/vsftpd.conf - #设定本地用户可以访问. thesudo sed-i-E's| #local_enable =yes|local_enable=yes|'/etc/vsftpd.conf - #设定可以进行写操作 -sudo sed-i-E's| #write_enable =yes|write_enable=yes|'/etc/vsftpd.conf - #设定上传后文件的权限掩码. +sudo sed-i-E's| #local_umask =022|local_umask=022|'/etc/vsftpd.conf - #修改掩码 +sudo sed-i-E's|local_umask=022|local_umask=000|'/etc/vsftpd.conf A atEcho"Start the FTP service" - sudo service vsftpd restart - -Echo"use method for ftp://192.168.0.30/"
Raspberry Pi Route (033)-Linux-based FTP script