How to restrict particular user in FTP server on OpenSUSE 13.1
How to restrict particular user in FTP server on OpenSUSE 13.1
The File Transfer Protocol (FTP) is a standard network protocol used to transfer of computer files between a client and server on a computer network. The FTP server is a computer program that uses the FTP file transfer protocol to download any files via FTP clients. The OpenSUSE can be used as a base and configure FTP server. This article shows on how to restrict a particular user in FTP server on OpenSUSE 13.1
Installation procedure
Since FTP users may authenticate themselves with sign-in protocol, the admin can restrict users for added security. For that, create a new configuration file named vsftd.conf using vim editor. Enter the contents in the file and save the changes.
linuxhelp1:~ # vim /etc/vsftpd.conf
[...]
# Uncomment and set YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
[...]
Then, create a new file named vsftpd.chroot_list and add the users that you want to give access to FTP server. Let' s add an user named user1
linuxhelp1:~ # vim /etc/vsftpd.chroot_list
user1
Restart the FTP service by executing a following command.
linuxhelp1:~ # systemctl restart vsftpd
Now you will be able to connect to FTP server with your credentials in the chroot list file.
ftp://user:password@host:port/path
so that some or all of the parts user:password@, :password, :port and /path may be excluded.
The components obey the following rules:
user – a username (user id) on the host
password – the password corresponding to the username; note: if the user and password field in a URL contains character : or @ or /, the character must be encoded