|Linux -> Webmin -> Setting FTP access using Webmin & SSH|
Setting FTP access using Webmin & SSH
After you created the website and DNS settings you now need an FTP account to upload your website.
There might be other ways to do this but we are trying to explain as simple as possible for you to be able to do it yourself.
Let’s first SSH the server.
If you don’t know how to do it, please refer to Connecting via SSH
Install proftpd (or the ftp server you prefer)
#apt-get –y install proftpd
#yum –y install proftpd
Now run the following:
Look for the line that contains DefaultRoot and uncomment it by removing the “#” from it.
Save the file but leave the SSH connection open as there is one more thing we need to do.
Let’s go to webmin.
At the left pane, click on System/Users and Groups, and select “Create a new user.
Provide a username for what is to be the FTP account. (ex. Site.ltd)
As “Home directory” select “Directory” and press the button to show the folders in your server. Select the /var/www/yourdomain folder you previously created or whatever folder you want the ftp account to login into.
Select the “Shell” /bin/false
Select “Normal Password” and provide a unique, complex password for the account
Select “New Group” and write down the same name as the user you’re creating
Click on “Create”
It will complete the process and take you back to the users list page.
Go back to the SSH console and run the following:
#chown username /var/www/yourdomain (folder you previously created or whatever folder you want the ftp user to own)
You can now exit the SSH console and try your new username with your favorite FTP Client.
Thank you for reading,