Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using CentOS 6 (64bit) and have VSFTPD installed.

I have two different users for vsftpd: privateuser and publicuser.

I need to configure that only privateuser can login to the ftp server from the local IP range (192.168.2/24) and publicuser can login from both the local range and another public range (example 192.168.2/24 and 180.150/16).

Is there any solution for this?

share|improve this question

You can't do this directly with vsftpd. You may get some mileage with pam_access e.g.

edit /etc/pam.d/vsftpd and add the line

account    required

to the beginning of the file, then edit /etc/security/access.conf and add the lines

- : privateuser : ALL EXCEPT
- : publicuser : ALL EXCEPT

which I think does what you want.

You may find it easier to switch to something like proftpd which has a richer set of access controls.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.