Posts Tagged ‘additional user’

Creating additional FTP Users In Plesk (Linux)

February 12th, 2010

Plesk for Linux, by default only allows one ftp users (While it does let you add multiple web users, they are locked to the same directory as the main ftp user). However you can get around this limitation by creating additional FTP users by creating them outside of Plesk, using SSH / Shell. The process is fairly simple as well and you can setup any directory structure that you want the new user to connect to, even for adding ftp access behind the root of a web directory if you like.

To do this, we simply need to do the following;

*Prior to doing this, make sure you already have an existing ftp user in place, as you will need their ID#

1. Log into your Linux server (Only applies to a dedicated server, colo server or virtual server – VPS).

2. Once you have logged in, you need to find an ID of an existing FTP user. To do this, simply type the following:

$id user     (user is the name of the existing ftp user)

3. If you have the user, you will be given an output that looks like this;

# uid=10002(user) gid=2524(psacln) groups=2524(psacln)

4. Take the uid number as you will need this to setup the new user.

5. Now, create the new user by using this command. Also with this command, you can set the directory you want them to have access to.;

/usr/sbin/useradd -u 10002 -o -d /var/www/vhosts/example.com/custom_folder -g psacln -s /bin/false newuser    (newuser is the name if the new account)

6. The new user has been created. Now you have to assign a password to it. To do this, type the following *make sure the password is not the same as the main Plesk ftp account*;

$passwd newuser password (Change password to the password you want to assign to the user)

7. It will then ask for you to confirm the password, type the password again. If done correctly, you will get the following message;

passwd: all authentication tokens updated successfully.

That’s it, the ftp user has been created. If you ever want to remove the user, you have to do it via command line as Plesk will not sure the user. To do this, simply type the following;

$/usr/sbin/userdel username