Linux Create FTP and set permissions and forget FTP account (password) modification

Source: Internet
Author: User

To forget the FTP password modification method:

1. Log in to the server
Cd/etc/vsftpd
Cat Ftpusers
Find the corresponding FTP username (if the user name also forgets so cd/etc then cat passwd View the user and the corresponding admin directory)
passwd FTP user name (carriage return)
Service VSFTPD Restart


Linux Add FTP Users and set permissions

To add an FTP user to Linux and set the appropriate permissions, proceed as follows:

1, Environment: FTP for VSFTP. The user named Test is restricted. The restricted path is/home/test



2, build the user, the command line state, under the root user:

Run command: "useradd-d/home/test Test"//Add user test and develop test user's home directory as/home/test



Run the command: "passwd test"//Set the password for test, enter the same password two times after running

3, change the user's corresponding permission settings:

Run command: "usermod-s/sbin/nologin Test"//limit user test cannot telnet, only FTP

Run command: "usermod-s/sbin/bash Test"//user test returned to normal

Run command: "usermod-d/test Test"//change user test's home directory to/test

4, restrict the user to access only/home/test, cannot access other paths

Modify the/etc/vsftpd/vsftpd.conf as follows:

Chroot_list_enable=yes
# (default follows)
Chroot_list_file=/etc/vsftpd/vsftpd.chroot_list

Edit the above content

First line: Chroot_list_enable=yes//Restrict access to own directory

Third line: Edit Vsftpd.chroot_list. According to the third line of the specified directory, locate the Chroot_list file. (Due to host differences, the file name may be slightly

have different)

Edit Vsftpd.chroot_list, add restricted users, one row per user name

5. Restart the server

Do not forget to restart the VSFTPD server after changing the configuration file

Run command:/etc/init.d/vsftpd restart

6, if you need to allow users to change the password, but do not have Telnet login system permissions:

Run command: "usermod-s/usr/bin/passwd Test"//user Telnet will go directly to the change interface

Linux Create FTP and set permissions and forget FTP account (password) modification

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.