Create an FTP user in Linux

Source: Internet
Author: User
Tags ftp login
1. install vsftpd: run yuminstallvsftpd in shell to install vsftpd. 2. modify vsftpd configuration: find vsftpd under/etc/vsftpd. conf file, modify the default configuration, including the listening address and port, whether to enable tcp, psav mode, and so on; configuration comparison...

1. install the vsftpd service:
Run yum install vsftpd in shell to install it successfully;

2. modify vsftpd configuration:
Find vsftpd in/etc/vsftpd. conf file, modify the default configuration, including the listening address and port, whether to enable the tcp and psav modes, etc. the configuration is relatively simple. for details, refer to the vsftpd Configuration Manual in my article.

3. start the vsftpd service:
Run service vsftpd start, or run/etc/init. d/vsftpd start.

4. create a user and logon directory for ftp
 
# Useradd-G ftp-d/directory name-M User name
 
# Passwd user
 
# Chown Username. ftp/directory name-R
# Chmod 750/directory name-R


Then you can use the username and account you created to log on to the ftp. The ftp login method is
Ftp host name;
Enter the user name;
Enter the password.
Of course, you can also use ftp.

Enable FTP
[Root @ huiyi ~] # Service vsftpd start

Starting vsftpd for vsftpd: [OK]

Disable FTP
[Root @ huiyi ~] # Service vsftpd stop

Shutting down vsftpd: [OK]

[1] FTP automatic logon and batch download
#! /Bin/bash
Ftp-n <

User guest 123456.
Binary
Cd/home/data
LCD/home/databackup
Prompt
Mget *
Close
Bye
!

[2] FTP automatic logon and file Upload
#! /Bin/bash
Ftp-n <

User guest 123456.
Binary
Hash
Cd/home/data
LCD/home/databackup
Prompt
Mput *
Close
Bye
!

Author: "java-2007"

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.