Add custom FTP user on Plesk via command line (SSH)

Plesk is a great Control Panel in the shared hosting environment, but there are a few things that are not available in the Control Panel. For example, you cannot create additional FTP user in Plesk Control panel for Linux (this support is enabled in Plesk for windows). But some time it is required to have multiple FTP accounts to upload/download data. You need to have shell access since the Plesk control panel won’t allow it in the GUI.

Assuming you already have an existing domain (example.com) with the primary FTP user (jack) with password (schmidt) with home directory (/var/www/vhosts/example.com), and you wish to create additional ftp users (jill) with the same access privileges as jack to subfolder like this /var/www/vhosts/example.com/custom_folder (make sure the folder already exists) or to main folder (/var/www/vhosts/example.com). To do this follow the instructions below:

1. Login to shell with root access and issue this command:
# id jack
it will show something like that:
# uid=10002(jack) gid=2524(psacln) groups=2524(psacln)

2. remember the uid of jack which is 10002, we will need it later.

3. create user via the command below and use jack’s uid like this (this will let jill access subfolder):
# /usr/sbin/useradd -u 10002 -o -d /var/www/vhosts/example.com/custom_folder -g psacln -s /bin/false jill

4. create password for jill:
# passwd jill (enter the new password and confirm it, does not have to be the same as jack’s)

You should now be able to use an FTP client to login with that user’s name and password. This is the only good solution for Plesk for nowadays.

Comments

Comments are closed.