• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

More than 1 FTP user per customer

L

loopy

Guest
Hello all,

is there a possibilty to give a customer more than 1 ftp-user?

(for example 10 or 15 ?)

Thanks
 
I'll second that...

How do you create extra ftp users? (not web users who only have access to their folder).

Cheers, Justin
 
Re: I'll second that...

Originally posted by Justin.Swan
How do you create extra ftp users? (not web users who only have access to their folder).


I saved the following code from another post on this subject. I've been told it works although I have not personally used it:

code:--------------------------------------------------------------------------------HOWTO: Procedure to manually add additional domain FTP users on a Plesk Server. (JYee)

Using the shell since the Plesk control panel won't allow it in the GUI.
See notes at bottom for subdomain FTP users.

Assuming you already have an existing domain (example.com) with the primary FTP user
(jack) with password (schmidt) with home directory (/home/httpd/vhosts/example.com),
and you wish to create additional ftp users (jill and bob) with the same access privileges as jack:

Procedure:

Login to server via SSH as root.

Issue the shell command:
cat /etc/passwd |grep 'jack'

This will show you a line similar to the following:
jack:x:10041:10001::/home/httpd/vhosts/example.com:/usr/local/psa/bin/chrootsh

The first number (after the 2nd colon : ) is 10041, so this is the UID of user jack.
You will need this in the 'useradd' lines since useradd wants a number for the UID.

The second number (after the 3rd colon : ) is 10001, this is the GID (psacln), we won't need that right now.

Then do the following shell commands to create the users and passwords:
useradd -u 10041 -o -d /home/httpd/vhosts/example.com -g psacln -s /usr/local/psa/bin/chrootsh jill
useradd -u 10041 -o -d /home/httpd/vhosts/example.com -g psacln -s /usr/local/psa/bin/chrootsh bob
passwd jill (enter the new password and confirm it, does not have to be the same as jack's)
passwd bob (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.
User jill and bob should be able to see the example.com docroot just as user jack can.
You should NOT be able to browse above the example.com docroot directory.

All 3 users should have the same access to the files since they belong to the same group, so no matter
which of the users created or edited the file(s), all should be able to access/edit/whatever the same files.

For more information on the shell utilities used, use:
man useradd
man passwd

NOTES:

Since these are users defined at the OS level, when connecting with an FTP client, they would login with
username 'jill', 'bob', or 'jack'. They would NOT use '[email protected]'.

This also means that USERNAMES MUST BE UNIQUE.


Subdomain FTP users:

If you wanted to change their default directory and limit them to a Plesk created subdomain docroot,
in the useradd line above, you would change "/home/httpd/vhosts/example.com" to
"/home/httpd/vhosts/example.com/subdomains/subname". So if you wanted to create the same users, but
for a subdomain called 'awesome':

Then do the following shell commands to create the users and passwords:
useradd -u 10041 -o -d /home/httpd/vhosts/example.com/subdomains/awesome -g psacln -s /usr/local/psa/bin/chrootsh jill
useradd -u 10041 -o -d /home/httpd/vhosts/example.com/subdomains/awesome -g psacln -s /usr/local/psa/bin/chrootsh bob
passwd jill (enter the new password and confirm it, does not have to be the same as jack's)
passwd bob (enter the new password and confirm it, does not have to be the same as jack's)

Deleting an FTP user:
userdel jill

(Note: this will not delete any files unless you use the -r option
which you probably don't want to do if they are sharing files!)

Note: Plesk subdomains versus 4PSA subdomains:

Plesk creates their subdomains in /home/httpd/vhosts/example.com/subdomains
4PSA creates their subdomains in /home/httpd/vhosts/example.com/httpdocs/subdomains

So keep this in mind for anyone using 4PSA Total Domains software! You may need to adjust the paths in my examples.
 
yes, OK. But that is not a solution one could recommend everyone. A solution via Plesk would be fine and I was told that it should be available in some version of Plesk 8.x.x - but still waiting...
 
I was told by Plesk it will be 8.1 that this is fixed.

Also 8.1 is supposed to have a full fix for backups (remote ftp), I can only assume this means you can transfer files from your remote backup to the server for restore purposes.

But the FTP extra users is part of 8.1, when who knows....
 
Back
Top