How to configure a user in vsftpd?
Using cloud server for your business is cost-effective and you also get the increased quality of service best in class features. So today, for this reason, a lot of business are using the Linux cloud hosting for their website. And one fo the best advantages of using cloud server is that you can access to your business files and data from any place at any time via internet connection. So by having all these facilities, you can concentrate on your core business. Not only that by having all these advantages it makes your Linux cloud hosting more reliable and flexible to use.
But today if you are already using Linux cloud server for your website and now if you are looking for information on how to configure a user in vsftpd on a cloud server then here is the complete information on it.
Follow the below steps to configure a user in vsftpd on a cloud server:
>>> Add a system user
The very first thing that you need to do is to create a new user for FTP access in your vsftpd by creating a new valid Linux system user, to create use the below command
>>> Disable SSH access for FTP users
So when you create a default user creation script gives a user the /bin/bash shell, which is too powerful.And if you don’t want your users to log in to your server via SSH, you can block this access. Not only that when you change the shell to /bin/false, the users can log in only via FTP or mail if you have that setup. So you need to modify the user access by using this command
usermod -s /sbin/nologin test
>>> Chroot a user
Once after disabling the SSH access for FTP users now you can configure vsftpd to chroot users to their home directories for better security and privacy. And when you chroot users they can’t move up a level in the directory structure after they log in. So with the help of vsftpd you can chroot a user by editing the following in the file /etc/vsftpd/vsftpd.conf:
>> Now you have to create a vsftp.chroot_list file and in there you need to enter users who do not use chroot.
Note: Every user uses chroot by default. Hence you need to, create a chroot_list file, even if the file is going to remain empty use the below command
>> So once after the file is created and after you set up your chroot_list you need to restart vsftpd so use the below command
service vsftpd restart