# Install vsftpd
$ sudo apt-get install vsftpd
# Open /etc/vsftpd.conf file and make changes as follows.Uncomment the below lines.
write_enable=YES
local_umask=022
chroot_local_user=YES #To prevent access to the other folders
# Add the following line at the end.
allow_writeable_chroot=YES
pasv_enable=Yes
pasv_min_port=40000
pasv_max_port=40100
# Create user with the below command.Use /usr/sbin/nologin shell to prevent access to the bash shell for the ftp users .
$ sudo useradd -m ercan-s /usr/sbin/nologin
$ sudo passwd ercan
# Open /etc/shells and add the following line at the end for allow login access for nologin shell .
/usr/sbin/nologin
# Restart vsftpd service using the below command
$ sudo service vsftpd restart
$ sudo apt-get install vsftpd
# Open /etc/vsftpd.conf file and make changes as follows.Uncomment the below lines.
write_enable=YES
local_umask=022
chroot_local_user=YES #To prevent access to the other folders
# Add the following line at the end.
allow_writeable_chroot=YES
pasv_enable=Yes
pasv_min_port=40000
pasv_max_port=40100
# Create user with the below command.Use /usr/sbin/nologin shell to prevent access to the bash shell for the ftp users .
$ sudo useradd -m ercan-s /usr/sbin/nologin
$ sudo passwd ercan
# Open /etc/shells and add the following line at the end for allow login access for nologin shell .
/usr/sbin/nologin
# Restart vsftpd service using the below command
$ sudo service vsftpd restart
Comments
Post a Comment