This FTP machine will get the ip 192.168.1.241. Still remember the ip script? Let’s make a call and reboot the server.
/home/base/ip.sh ftp 192.168.1 241 1
Now install the server and clean the cache.
tazpkg get-install pure-ftpd
Once pureftpd is installed you will need to create the correct user for this. In this case I will use ftpgroup and ftpuser.
addgroup -S ftpgroup
adduser -SH ftpuser -G ftpgroup
Tip: to verify if the accounts exist cat the group and passwd file. If they mention ‘ftpgroup’ and ‘ftpuser’, everything is fine.
So once the unix user is made, create the sub user(contributor in this case) in ‘/home/ftpusers’ and change the owner of the contributor map to ftpuser.
chown ftpuser -R /home/ftpusers/contributor
Now add ad new contributor user to ftpd and assign the unix user of this ftp user to ftpuser
pure-pw useradd contributor -u ftpuser -d /home/ftpusers/contributor
To verify if the user exists you can write:
You can see that this user operates under the ftpuser/ftpgroup.
root@base:/# pure-pw show contributor
Login : contributor
Password : $1$yljZ5iF0$RSfbAJ4ZDtyAQtjOYSKwg.
UID : 100 (ftpuser)
GID : 101 (ftpgroup)
Directory : /home/ftpusers/contributor/./
Full name :
Download bandwidth : 0 Kb (unlimited)
Upload bandwidth : 0 Kb (unlimited)
Max files : 0 (unlimited)
Max size : 0 Mb (unlimited)
Ratio : 0:0 (unlimited:unlimited)
Allowed local IPs :
Denied local IPs :
Allowed client IPs :
Denied client IPs :
Time restrictions : 0000-0000 (unlimited)
Max sim sessions : 0 (unlimited)
Now the user is done, create the startup script. First assign the service to load during startup. This can be done in the rcS.conf file.
RUN_DAEMONS="dbus hald slim firewall dropbear lighttpd pure-ftpd"
Once this is done edit the daemons file to add the options that will be added to the service.
# Pure FTPd
PUREFTPD_OPTIONS="-4 -H -A -B -j -l puredb:/etc/pureftpd.pdb"
Once this is done, edit the /etc/init.d/pure-ftp file. This is the service start file. Apparently there is a fuckup in this file as the pure-ftpd service isn’t like the others. It didn’t contain daemon options and everything is just in the startup script. And I don’t like that >:(. So let’s change it.
Find this line:
and replace it with:
Voila FTP server is done, now reboot the machine and see if the service is running once you reboot:
root@base:~# ps | grep -i pure-ftpd
1392 root 0:00 pure-ftpd (SERVER)
1436 root 0:00 grep -i pure-ftpd
If everything is running you should be able to connect to ftp://firstname.lastname@example.org/ with windows (or FileZilla, whatever client you are using.)
That’s it, below is the download link for this small tutorial:
ftp.7z (12,4 MB)