CentOS Linux Server Guide

CentOS Linux FTP Server

 FTP Security- Restricting Local User Access 

 

 

There are few ways to tighten down your FTP access. I found the easiest way  is just to add any 'blacklist' users into /etc/vsftpd/ftpusers. This will block any local user account that

 

Let's have a quick check on /etc/vsftpd/ftpusers, the users below are not allowed to login via ftp.

 
[root@srv2 vsftpd]# cat /etc/vsftpd/ftpusers
# Users that are not allowed to login via ftp
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

 

 

In the following scenario, we want to block Jane from ftp to our FTP server. Let's check if she has access right before we edit /etc/vsftpd/ftpusers.
C:\Users\OptNote>ftp 192.168.13.145
Connected to 192.168.13.145.
220 (vsFTPd 2.0.5)
User (192.168.13.145:(none)): jane
331 Please specify the password.
Password:
230 Login successful.
ftp> pwd
257 "/home/jane"
ftp> bye
221 Goodbye
.

 

 

Step1: edit the /etc/vsftpd/ftpusers

 
[root@srv2 vsftpd]# vim vsftpd.conf

 

Step2: Add the user you want to block in /etc/vsftpd/ftpusers file

We are add user jane
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
jane

 

Step3: Verify the setting and user access

Now, have a quick check on the Jane's access. This following confirmed that Jane has no access right to our FTP server.
C:\Users\OptNote>ftp 192.168.13.145
Connected to 192.168.13.145.
220 (vsFTPd 2.0.5)
User (192.168.13.145:(none)): jane
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> quit
221 Goodbye.

 

Back to CentOS Linux FTP



Copyright 2011 http://www.1a-centosserver.com All Rights Reserved

All trademarks are the property of their respective owners.

Contact Us | Terms of Use | Privacy Policy