[Email protected]:~# sudo apt-get update
[Email protected]:~# sudo apt-get install vsftpd
[Email protected]:/home/myserver# service VSFTPD Restart
[Email protected]:/etc# VI vsftpd.conf
Listen=yes
Run Standalone with IPV6? Like the listen parameter, except VSFTPD would listen on a IPv6 socketinstead of an IPv4 one. This parameter and the listen parameter is mutuallyexclusive.
#listen_ipv6 =yes
#
Allow anonymous FTP? (beware-allowed by default if you comment this out).
Anonymous_enable=no
#
Uncomment this to allow local users to log in.
Local_enable=yes
#
Uncomment this to enable any form of FTP write command.
Write_enable=yes
#
Default umask for Local Users is 077. wish to 022,if your users expect that (022 are used by the most other ftpd ' s)
local_umask=022
Dirmessage_enable=yes
Use_localtime=yes
#
Activate logging of Uploads/downloads.
Xferlog_enable=yes
#
Make sure port transfer connections originate from port (ftp-data).
Connect_from_port_20=yes
Access.
Secure_chroot_dir=/var/run/vsftpd/empty
#
This string is the name of the PAM service vsftpd would use.
Pam_service_name=ftp
#
This option specifies the location of the RSA certificate to use for sslencrypted connections.
Rsa_cert_file=/etc/ssl/private/vsftpd.pem
2. Configuration
[Email protected]:~ #groupadd scan1
[Email protected]:~ #useradd-G scan1-d/home/scan1-m Ftpscan
[Email protected]:~ #useradd-G scan1-d/home/scan1-m ftpscan2
[Email protected]:~ #chown ftpscan:ftpscan/home/scan1/
[Email protected]:~# chmod-r 755/home/scan1/
[Email protected]:~# fdisk-l
[Email protected]:~# blkid/dev/sda5 Find the UUID
[Email protected]:~# vi/etc/fstab
Uuid=d71005bf-3bd2-46d6-a7be-3af47f76fad3/home/scan1 EXT4 Defaults 0 2
3, 530 Login Incorrect error resolution method
1, vsftp hint 530 Login Incorrect error resolution method
Only need to put the/etc/pam.d/vsftpd file in the
Auth Required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
This sentence is ok to comment out. Add a # to the front.
Restart the VSFTPD service. Problem solving
4. Dual NIC Configuration
[Email protected]:/etc# vim/etc/network/interfaces
Auto Lo
Iface Lo inet Loopback
Auto Etho
Iface Lo inet Loopback
Auto Eth1
Iface Lo inet Loopback
Up Route add-net 192.168.0.0 netmask 255.255.0.0 GW 192.168.23.1
Up Route add-net 10.0.0.0 netmask 255.255.0.0 GW 10.0.16.1
[Email protected]:~# route Delete Default
[Email protected]:~# Route add-net 192.168.0.0 netmask 255.255.0.0 Dev eth0
[Email protected]:~# Route add-net 10.0.0.0 netmask 255.0.0.0 Dev eth1
[Email protected]:~# Route add-net 192.168.0.0 netmask 255.255.0.0 GW 192.168.23.1
Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TEST UBUNTU 16.0
[Email protected]:~# sudo apt-get install vsftpd
[Email protected]:/home/myserver# sudo service vsftpd restart
Step Two: Create a new directory/home/scan1/as the user home directory
sudo mkdir/home/scan1/
[Email protected]:~ #groupadd scan1
Step three: Create a new user uftp, create a home directory and the shell used, and set the password
[Email protected]:/home# useradd-g scan1-d/home/scan1/-M mis-s/bin/bash
[Email protected]:/home# passwd MIS
Enter the new UNIX password:
Enter the new UNIX password again:
PASSWD: The password has succeeded in changing
[Email protected]:~# useradd-g scan1-d/home/scan1/-M mis2-s/bin/bash
[Email protected]:~# passwd Mis2
Enter the new UNIX password:
Enter the new UNIX password again:
PASSWD: The password has succeeded in changing
Fourth step: Create a new file/etc/vsftpd.user_list for users who are allowed to access ftp:
[Email protected]:/home# vi/etc/vsftpd.user_list
Mis
Mis2
[Email protected]:/home# vi/etc/vsftpd.conf
Run standalone? VSFTPD can run either from the inetd or as a standalonedaemon started from an initscript.
Listen=yes
#
Run Standalone with IPV6? Like the listen parameter, except VSFTPD would listen on a IPv6 socketinstead of an IPv4 one. This parameter and the listen parameter is mutuallyexclusive.
#listen_ipv6 =yes
#
Allow anonymous FTP? (Disabled by default)
Anonymous_enable=no
#
Uncomment this to allow local users to log in.
Local_enable=yes
#
Uncomment this to enable any form of FTP write command.
Write_enable=yes
#
Default umask for Local Users is 077. wish to 022,if your users expect that (022 are used by the most other ftpd ' s)
local_umask=022
Activate directory messages-messages given to remote users when Theygo into a certain directory.
Dirmessage_enable=yes
#
If enabled, VSFTPD would display directory listings with the Timein your local time zone. The default is to display GMT. Thetimes returned by the MDTM FTP command is also affected by thisoption.
Use_localtime=yes
#
Activate logging of Uploads/downloads.
Xferlog_enable=yes
#
Make sure port transfer connections originate from port (ftp-data).
Connect_from_port_20=yes
#
This option should being the name of a directory which is empty. Also, Thedirectory should is not being writable by the FTP user. This directory was usedas a secure chroot () jail at times VSFTPD does not require filesystemaccess.
Secure_chroot_dir=/var/run/vsftpd/empty
#
This string is the name of the PAM service vsftpd would use.
Pam_service_name=vsftpd
Userlist_file=/etc/vsftpd.user_list
#userlist_enable =yes
#userlist_deny =no can jump directly into the user screen
#
This option specifies the location of the RSA certificate to use for sslencrypted connections.
Rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
This option is specifies the location of the RSA key to use for sslencrypted connections.
Rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
[Email protected]:~# chmod-r 755/home/scan1/
[Email protected]:~# chown-r mis:scan1/home/scan1/
[Email protected]:~# sudo service vsftpd restart
Note: The MIS user has the right to read and write, and the Mis2 and DSC user are restricted.
Method 2:
[Email protected]:/home/scan1# chmod-r u=x,g=rwx/home/scan1/
[Email protected]:/home/scan1# ls-al
Note: The MIS user has the right to read, MIS2, DSC user has the right to read.
[Email protected]:/home# sudo service vsftpd stop
Ubuntu vsftp Erection