LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Two ftp accounts in one site (https://www.linuxquestions.org/questions/linux-newbie-8/two-ftp-accounts-in-one-site-304052/)

Roosta21 03-20-2005 06:22 PM

Two ftp accounts in one site
 
Hi
I have created a ftp for one of my websites (using plesk).. but I would like to add another ftp account to the same site, so I can restrict certain folders for the one ftp account and not other.. Is this possible

R

marghorp 03-20-2005 06:49 PM

Sure, just create a user, and assign him the home directory, for which the user will have rights. Then chroot him so that he can not escape out of his home directory. :)

Roosta21 03-21-2005 04:53 AM

Thanks for the reply... i'm still learning linux, is it possible you could expand or maybe point me to a website that may have more inofrmation on this subject.

R

marghorp 03-24-2005 07:03 AM

Sure. If you created a FTP for one website, you had to create a user to login to and be able to do stuff with your FTP account (like read, write, execute).

Now if you made it work for one user, let's call him larry. You would login as larry and use his password. That way you would come to larry's home directory, presumably /home/larry. You can set a users home directory in the /etc/passwd file or with usermod command (see man usermod for details on how to use the command).

Now, if you have a FTP account for one user, just add a new user, using the command useradd or adduser new_username(whichever works on your system). When you add the user (if it doesn't ask you for a password), assign the user a password, using the passwd command, like this: passwd new_username, where new_username is the name of the new user you just created. Let's call her betty.

The commands would be:

adduser betty or useradd betty
passwd betty

Now you have the new user betty and you have a password for the user.

This is pretty much it. If you'd like the user to be able to write only to a chosen directory, you can assign that directory as a home directory to that user with the usermod command, or you can set a link to the directory in the user's home directory.

Wit this information you should be able to make it work, or at least set you in the right direction.

The best place for more information is your FTP server's website. You say you use plesk? I never heard of plesk, but it should be the same in most of the servers.

Good luck!

If you run in any more problems, post them here, or you can msg directly, as I don't look at LQ every day.


All times are GMT -5. The time now is 06:02 PM.