linux-12th Lesson Note-[ftp Server build]-[local ftp]-[02]

Source: Internet
Author: User
Tags stdin

FTP Local Server Setup

Yum Installation VSFTPD Service:

[Email protected] ~]# yum-y install VSFTPD

To create a local two user:

[Email protected] ~]# Useradd test1

[Email protected] ~]# Useradd test2

[Email protected] ~]# echo "123" | passwd--stdin test1 &>/dev/null

[Email protected] ~]# echo "123" | passwd--stdin test2 &>/dev/null

[[email protected] ~]# ID test1

uid=501 (test1) gid=501 (test1) groups=501 (test1)

[[email protected] ~]# ID test2

uid=502 (test2) gid=502 (test2) groups=502 (test2)

Backup configuration file and configuration:

Backup:

[[email protected] ~]# Cp/etc/vsftpd/vsftpd.conf{,.bak}

[Email protected] ~]# ls/etc/vsftpd/

Ftpusers user_list vsftpd.conf Vsftpd.conf.bak vsftpd_conf_migrate.sh

Configuration:

# Default Umask for Local users are 077. wish to 022,

# If your users expect that (022 are used by the most other ftpd ' s)

     local_umask=077 //777-077=700 only allowed to be master readable writable

Chroot_local_user=yes //Lock the user's home directory (with the user's home directory as the root)

Turn on services and turn off firewalls and SELinux:

[[email protected] vsftpd]#/etc/init.d/vsftpd start

Starting vsftpd for VSFTPD: [OK]

[[Email protected] vsftpd]# service iptables stop

[Email protected] vsftpd]# Setenforce 0

Setenforce:selinux is disabled

Gen Jie test File Tags:

[Email protected] vsftpd]# Touch/home/test1/test1.txt #测试文件

[Email protected] vsftpd]# Touch/home/test2/test2.txt #测试文件

Validation results:

Test1:

Test2:

linux-12th Lesson Note-[ftp Server build]-[local ftp]-[02]

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.