Ubuntu FTP Server

Source: Internet
Author: User
Tags file upload

Install and start the FTP service
    • Installing VSFTPD
Use apt-getInstallationvsftpd
sudo Install vsftpd-y
    • Start VSFTPD
After the installation is complete, VSFTPD automatically starts netstatcommand to see that the system has21 ports monitored.
sudo grep  +

If it does not start, you can manually turn on the VSFTPD service:
sudo systemctl start Vsftpd.service
    • New User Home Directory
sudo mkdir /home/uftp

When you're done, you can see the new folder Uftp here/home/uftp.
    • Create a login Welcome file
sudo Touch /home/uftp/welcome.txt
    • Create a new user uftp and set a password
Create a user uftp
sudo useradd-d/home/uftp-s/bin/bash uftp
    • Set a password for a user uftp
sudo passwd uftp
    • Remove the vsftpd in PAM.D because the profile causes the FTP to fail to log on with the user name:
sudo passwd uftp
    • Restrict the user to access via FTP only
Restrict users uftpYou can access the server only through FTP, not directly to the server:
sudo usermod-s/sbin/nologin uftp
    • Modifying the VSFTPD configuration
sudo chmod A +w /etc/vsftpd.conf

    • Modify the configuration in the/etc/vsftpd.conf file (add the following configuration directly to the bottom of the configuration file):
# Restrict users to directories outside the home directory access Chroot_local_user=ftp  user list Userlist_deny=nouserlist_ Enable=ftp  user list userlist_file=/etc/vsftpd.user_list# does not configure 530 issues that can cause inexplicable seccomp_ Sandbox=no# allow file upload write_enable=yes# use UTF8 encoding utf8_filesystem=yes

    • Create a new file to /etc/vsftpd.user_list hold users who are allowed to access ftp:
sudo Touch /etc/vsftpd.user_listsudochmod A +w /etc/vsftpd.user_list

    • Modify/etc/vsftpd.user_list to join the user you just created:
Vsftpd.user_listuftp

    • Set access Permissions

Set Home Directory access rights (read only):

sudo chmod A-w /home/uftp
    • Create a new public directory and set permissions (Read and write):
sudo mkdir sudo chmod 777 -r/home/uftp/public

    • Restart the VSFTPD service:
sudo systemctl restart Vsftpd.service

Ubuntu FTP Server

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.