Create a ftp user in Linux

In order to enable communication of large files over File Transfer Protocol (FTP), a user is required to be created on the operating system mounted to a specific root within the operating system.

The following explains how to create a FTP user within Linux environment.

1. login on to the shell as root

> su – root

2. Add user name to login via ftp

> useradd <username>

E.g.:- useradd thisara

3. Add user group

> groupadd <usergroup>

E.g.:- groupadd operate

4. Assign new user to the user-group

> gpasswd -a <username> <usergroup>

E.g.:- gpasswd -a thisara operate

5. Assign a default folder location to the newly created folder where at time of login, specified folder location will be loaded.

> usermod -d <ftp default folder> <username>

E.g.:- usermod -d  /home/thisara thisara

6.  Assign a password to the newly created user name

> passwd <username> (specify a password)

E.g.:- passwd thisara

7. Test the login on ftp client software using the host-name, username and the password with default ftp port.

Further access controlling could be specified on the new folder to avoid accessing other folders by the new ftp user.

Below commands are being tested on RedHat linux kernel 5.4

2 Comments Add yours

  1. Small Dental says:

    Great information. Lucky me I came across your blog by chance (stumbleupon).
    I have saved it for later!

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s