Do not add the parameter-V. Otherwise, you will test it on Linux.
VI autoftp. Sh
The content is as follows:
FTP-n-v-I <./autoftp.txt
Linux Command (used to set file permissions) umask
022
The preceding command indicates that the umask value in Linux is 022.
Umask-S
U = rwx, G = RX, O = RX
Umask 177
Umask-S
U = RW, G =, O =
The above two-line command changes the umask value to 177. Only the file owner has the permission to read and write the file, and other users cannot access the file. This is obviously a very safe state.
Chmod U + rwx-r/directory sets the permission for users to read, write, and execute Directories
Create a response script
VI autoftp.txt
The content is as follows:
Open *. * 21
User Username Password
PWD
Put ftp.txt
Close
Bye
The number of FTP commands is as follows:
The FTP command line format is: ftp-v-d-I-n-g [host name]
-V: displays all the response information of the remote server.
-D. Use the debugging method.
-N restrict FTP automatic logon, that is, the. netrc file is not used.
-G cancels the global file name.