I needed to create a user with FTP access. The home directory is a subdirectory inside another users home directory. I don't know if that is a problem. Basically, user1 home dir is /home/user1 and user2 home dir is /home/usr1/public_html/usr2. User2 can SFTP into that directory without issue. I want to give it the ability to use FTP as well. This is an offsite server running Centos 5.7 with WHM and cPanel. I only mention that because WHM seems to be more efficient than my bash commands. This is the script I used to create the new user:

useradd turbolinkorders -d /home/user1/public_html/user2 -o -u 503 -g 500

The uid and gid of user2 are also identical to those of user1. The -o allows for duplicate uids. Not sure if that is best practice or not.

link|improve this question
Seeing as you've mentioned "best practice", why are you even contemplating FTP? – John Gardeniers Jan 6 at 2:16
feedback

1 Answer

I think it is not clear what you are asking here. user2 in your case is a normal account with a normal homedir, who has normal ssh/sftp access. Are you asking "How do I give a normal user, FTP access?"

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.