Discussion on Linux Shell's automatic FTP operations

Source: Internet
Author: User
Tags ftp commands

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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.