ServerPronto HowTo Sales: 1-877-24-PRONTO   Live Chat   
Setting FTP access using Webmin & SSH
P1
Linux -> Webmin -> Setting FTP access using Webmin & SSH

<PREVIOUS

NEXT>

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)

  • If you’re running Debian or Ubuntu, run:

#apt-get –y install proftpd

  • If you’re running CentOS, Fedora or Red Hat, run:

#yum –y install proftpd

Now run the following:

  1. #echo “/bin/false” >> /etc/shells
  2. #nano /etc/proftpd/proftpd.conf

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.

This can be done from http://yourserverIP:10000 or https://yourserverIP:10000 (add a security exception)

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

Disable:

  • Create home directory
  • Copy template files…
  • Create user in other modules

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,

Serverpronto.

<PREVIOUS

NEXT>