How to setup Virtual FTP server using pure-ftpd in CentOS

To setup Virtual FTP server using pure-ftpd in CentOS is as below :

1. Download the packages.
Assuming you already had rpmforge repo enable in your yum.conf.d

yum install pure-ftpd pure-ftpd-selinux -y

2. Add the a valid user to behave / mapped as the virtual user.
need only one.

#useradd ftpuser -d /opt/ftp_users

2. then edit the config file /etc/pure-ftpd/pure-ftpd.conf

to reflect the differences as below :

[[email protected] pure-ftpd]# diff pure-ftpd.conf.original /home/namran/ftp/pure-ftpd.conf 
34c34
< BrokenClientsCompatibility  no
---
> BrokenClientsCompatibility  yes
40c40
< MaxClientsNumber            50
---
> MaxClientsNumber            200
52c52
< MaxClientsPerIP             8
---
> MaxClientsPerIP             24
77c77
< NoAnonymous                 no
---
> NoAnonymous                 yes
126c126
< # PureDB                        /etc/pure-ftpd/pureftpd.pdb
---
> PureDB                        /etc/pure-ftpd/pureftpd.pdb
137c137
< PAMAuthentication             yes
---
> # PAMAuthentication             yes
436c436
< # IPV4Only                 yes
---
> IPV4Only                 yes

3. then make sure to add user with something as following sequence :

mkdir /opt/ftp_users/usernamehere
chown ftpuser:ftpuser /opt/ftp_users/usernamehere
pure-pw useradd usernamehere -u ftpuser -g ftpuser -d /opt/ftp_users/usernamehere/
pure-pw mkdb
pure-pw list

4. Test by trying to login as newly added user.
then try to put / make directory to make sure everything is fine.

That’s all.

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Like

Related Post

6 Responses

  1. dotsha says:

    The problem is:

    1) Most aunty and uncle types will never know how to log into their router and disable it. Not entirely a big problem as they are okay with the default settings, BUT …

    2) … At that time, TM set a standard “admin123” (not exact word) password, i.e. standard easy-to-guess password on all router.

    So the big hoo haa is not that TM can remote admin your router, the big hoo haa is that someone else can remote admin your router.

    For router, the impact is not so significant, worse case they can get into your personal data and copy out.

    But let’s say similar situation exists with the phone VOIP/SIP setup. So if someone “borrows” your account and makes IDD calls … and billed to you, you would not be quiet …

    Reply
  2. dotsha says:

    ALSO … it turned out later that whether the password is standard and simple, or unique and complicated makes no difference.

    There’s a bug in the firmware of that router that lets someone remotely download the settings without having to provide an administrator id and password! 😎

    Reply
  3. namran says:

    haha.. that’s make sense to either replace this DLink DIR-615 or change it to support use custom router instead.

    However , TM had disabled it from the menu by now.
    plain locked up ? was thinking is it worth to re-flash with original firmware or not just because some script inside /www/bsc_wan.php got commented out?

    Reply
  4. dotsha says:

    I think original dlink firmware doesn’t have the pppoe over vlan support. this I’ve custom done for tm.

    And so far if you flash it with dd-wrt, tv stops working.

    the other way is to set it to bridged mode + vlan tagging, and use back your old router. or is that the option tm disabled?

    Reply
  5. dotsha says:

    I think original dlink firmware doesn’t have the pppoe over vlan support. this is custom done for tm.

    And so far if you flash it with dd-wrt, tv stops working.

    the other way is to set it to bridged mode + vlan tagging, and use back your old router. or is that the option tm disabled?

    Reply
  6. WeeMeng says:

    Anyone can let me know what is the user and password to login to my Dlink .

    and would like to know anyone have try to set up wifi router ? ( i am thinking to use my 3Com router instead of this DLink )

    Thanks
    WM

    Reply

Anything to add?

X