LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-16-2013, 07:27 AM   #1
Juc1
Member
 
Registered: Sep 2011
Location: UK
Posts: 78

Rep: Reputation: 0
add ftp user in ubuntu vps


Hi all,

I am trying to follow the instructions here to add an FTP user to my Ubuntu VPS. Can anyone please tell me does this look ok? Also it does not seem to mention adding the FTP user to a group so is that not necessary?

Thanks...

Give necessary permissions to the folder that you want to upload and download files to:
Code:
$ chmod -R 777 /var/www/example.com/httpdocs
Create an FTP user called "ftp_testuser":

Code:
$ useradd -d /var/www/example.com/httpdocs ftp_testuser
Give password for the created user “ftp_testuser”:

Code:
$ passwd ftp_testuser
 
Old 03-17-2013, 12:47 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Is there a problem when you try to enter in these commands? I'm not clear if there is actually an issue you are having, or if you're just asking out of curiosity.
 
Old 03-17-2013, 06:55 AM   #3
Juc1
Member
 
Registered: Sep 2011
Location: UK
Posts: 78

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MS3FGX View Post
Is there a problem when you try to enter in these commands? I'm not clear if there is actually an issue you are having, or if you're just asking out of curiosity.
@ MS3FGX I am just checking is this the proper / good practice way to do it. Some questions please:

Re command # 2 why does the add user command mention the directory?

Also these instructions do not seem to add the new user to a group so is this optional?

Does this command link the user to a directory as an alternative to putting the user in a group?

Thanks...
 
Old 03-17-2013, 03:26 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
In #2 the -d option is used because the home directory is nonstandard, i.e. it's not /home/<username>.

The useradd command will automatically add the user to a group -- every user has a primary group ID. The default on Ubuntu I believe is to create a new group with the same name as the user; you can verify this with the command "id ftp_testuser".
 
1 members found this post helpful.
Old 03-19-2013, 07:54 PM   #5
Juc1
Member
 
Registered: Sep 2011
Location: UK
Posts: 78

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by btmiller View Post
In #2 the -d option is used because the home directory is nonstandard, i.e. it's not /home/<username>.

The useradd command will automatically add the user to a group -- every user has a primary group ID. The default on Ubuntu I believe is to create a new group with the same name as the user; you can verify this with the command "id ftp_testuser".
OK thanks - I tried this so here it is:

Code:
$ useradd mary
$ id mary
uid=1002(mary) gid=1003(mary) groups=1003(mary)
$
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you know how to add an ftp user in Linux? amtoj Linux - Newbie 5 08-29-2008 07:29 AM
Add and limit Ftp user to only a folder ciccio_pasticcio Linux - Newbie 5 07-21-2006 07:36 AM
how to add ftp user. luqman Red Hat 1 02-24-2005 09:51 AM
Add FTP User Via Web Form alanpollenz Linux - General 2 05-28-2004 06:14 PM
How to add an FTP user who can just read and download the files and folders? yuzuohong Linux - General 1 02-15-2003 01:29 AM


All times are GMT -5. The time now is 04:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration