How to Install and Configure Vsftpd Ftp Server on RHEL 6/ CentOS 6.2/ Ubuntu 11.10/ Fedora /Debian. VSftpd (Very Secure FTP Daemon) is an FTP server for Linux distributions. Vsftpd is the default FTP server is the Fedora, RHEL, CentOS, Ubuntu, NimbleX Linux distributions. It is not just secure as the name suggests but also delivers excellent performance by consuming less memory.
In this tutorial, i will show how to install and configure Vsftpd service by adding ftp users and locking the directory to individual users on Red Hat Enterprise Linux 6 (RHEL 6), Ubuntu, CentOS and Fedora.
Default ftp port : 21
Default configuration file : /etc/vsftpd.conf
Basic Vsftpd commands on RHEL/CentOS/Fedora
1. Install the Vsftpd service.
2. Start Vsftpd Service :
3. Stop Vsftpd Service :
4. Restart Vsftpd Service :
5. Make Vsftpd Service auto start on boot up :
6. Edit the vsftp.conf
Basic Vsftpd Commands on Ubuntu/ Debian
1. Install the Vsftpd service on Ubuntu.
2. Start Vsftpd Service :
3. Stop Vsftpd Service :
4. Restart Vsftpd Service :
5. Edit the vsftp.conf
Configure Vsftpd
Make the following changes of Vsftpd.conf on RHEL/CentOS/Fedora/Debian:
We don’t want anonymous login:
Enable local users:
The ftpuser should be able to write data:
Port 20 need to turned off, makes vsftpd run less privileged:
Chroot everyone:
set umask to 022 to make sure that all the files (644) and folders (755) you upload get the proper permissions.
That basic configuration is complete.
Now Let us begin with locking / securing a directory to user.
Setup a password for the user:
In order to enable the ftpuser read and write the data in your home dir, change the permission and take ownership:
Create userlist file and add the user:
Ubuntu / Debian:
CentOS / Fedora / RHEL
Add the user:
save the file and open the vsftp.conf file again:
Add the following lines at the end of the file and save it:
After completing all these procedures it is almost ready to use it, give it a try but you will get a 500 OOPS permission denied error.
To fix it you need to add a nologin to the shell set.
The file should look like this:
Add this line at the end:
Now create a usergroup and add the ftpuser to it:
沒有留言:
張貼留言
歡迎熱愛 Puzzle and Dragons 的玩家一起上來討論及研究各種降臨打法。
進擊的 Puzzle and Dragons Facebook 專頁現已開幕 ~ 歡迎大家上去追查各種新舊貼。 Enjoy your Puzzle and Dragons