- Linux Server with Root
- SSH Commands Experience
Installation and configuration for FTP Server using Pure-FTPd
- Login to root via SSH
- Create user and group without any privileges and no valid shell.
groupadd _pure-ftpd useradd -g _pure-ftpd -d /var/empty -s /etc _pure-ftpd
Note- Don’t Use this user and group anywhere for any purpose.
- Download Latest Pure-FTPd tar ball according to your CPU Architecture and Distribution
- Extract tar ball using
tar -xvf *.tar.gz
- Prepare source code for installation
–with-everything flag will build a big server with almost all features turned on:
altlog, cookies, throttling, ratios, ftpwho, upload script, virtual users
(puredb), quotas, virtual hosts, directory aliases, external authentication,
Bonjour and privilege separation.
- Install prepared binary from source
- Link Pure-FTPd to .conf file in /etc/
- We need to make slight configuration changes in pure-ftpd.conf file
- Look for #UnixAuthentication and uncomment that line (remove the # symbol)
- Uncomment the PureDB line
- Uncomment the CreateHomeDir line
- Save and exit conf file
- Start FTP Server using
‘&’ is mandatory, please don’t skip it
- FTP Server is ready and ready to role. Run following to test
- We will configure to run FTP Server on boot, add the following line in /etc/rc.d/rc.localor /etc/rc.d/boot.local and don’t forget the ‘&’ sign. Then save and exit.
Create Virtual User
- Login to root via SSH.
- Create user ftpuser and group ftpgroup
groupadd ftpgroup useradd -g ftpgroup -d /dev/null -s /etc ftpuser
- For creating FTP user we need to decide in which user and group it goes. We will create basezap FTP user and it will be added in user blogger and group also blogger. Enter Password for created user twice when asked after below command execution.
pure-pw useradd basezap -u blogger -g blogger -d /home/blogger/public_html/
/home/blogger/public_html/ is home directory for basezap FTP user.
- If you want to convert all system (/etc/passwd) accounts to virtual FTP users
pure-pwconvert >> /etc/pureftpd.passwd
- Update the Database
Now you are ready to connect to FTP server and virtual user using your favourite FTP Client.