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.

If the user try to connect to FTP server with users other than in the chroot list, then you may get the following error denying the user access.

The configuration procedure to restrict users in FTP server on OpenSUSE 13.1 is done successfully.

Tag : OpenSUSE FTP
FAQ
Q
How do I pass a username and password to the FTP server from a web browser?
A
According to the specification of URL formats, RFC 1738, an FTP URL is of the form:
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
Q
When i type ls command it show 425 failed to establish connection!
A
use the appropriate passive ports and also make sure that no other ports are listening on it.
Q
How do you make multiple users land in the same directory?
A
you should Specify the directory in "local_root=/path/to/directory/"
Q
Filezilla not able to find ftp connection?
A
First make sure your ftp is accessible and not been restricted by any firewall connections.
Q
What is the best alternative for filezilla?
A
here I have to give some of the alternative for this "LFTP and gFTP".