LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-01-2010, 04:30 PM   #1
solutionsdxb
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Rep: Reputation: 0
how to create ftp user id in Centos


hi ,

i am a newbie and i wan to create ftp user id and password in centos , so that i can provide access to various director in www folder.

kindly suggest how i can achieve this in centos server.

with regards
 
Old 08-01-2010, 08:51 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

1. Since you didn't specify, I'd recommend using vsftp as your server.

2. As you're probably aware, you DON'T have to set up any "special users" - you can absolutely just have "standard users" securely user your FTP service.

Since I presume you don't want to do this...

3. You'll also need "PAM" for your "virtual FTP users"

This article explains how it works. The article is about Ubuntu, but the same rules apply to CentOS. Just substitute "yum install" whenever you see "apt-get"

http://howto.gumph.org/content/setup...ies-in-vsftpd/

'Hope that helps .. PSM
 
Old 08-02-2010, 01:00 AM   #3
solutionsdxb
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Hi ,

Thanks for the information , could you please suggest me how to know what is the current FTP service installed in my server , is there any command line to do that.

with regards
 
Old 08-02-2010, 01:12 AM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
One Pop Favorite for Centos is this:

Quote:
rpm -qa |grep -i ftp
 
Old 08-02-2010, 03:08 PM   #5
solutionsdxb
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 0
hi after your suggestion i have tried and found below as ftp server , so could you please suggest now how can i create ftp user id and password and allow them to access only specific directory under the www\html\ directory.


ftp-0.17-35.el5
vsftpd-2.0.5-16.el5_4.1
lftp-4.0.5-1.el5.rf

actually i am having three different user and i want them to allow three different directory under www/html/user1
www/html/user2
www/html/user3

how can i achieve the above situation.


please help as i am new and never created ftp user before.

with regards

Last edited by solutionsdxb; 08-02-2010 at 03:10 PM.
 
Old 08-03-2010, 08:59 AM   #6
solutionsdxb
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 0
please help
 
Old 08-03-2010, 05:25 PM   #7
solutionsdxb
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 0
is there any body to help , the whole linux form does not have any body who can help me in this please
 
Old 08-04-2010, 12:59 AM   #8
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
You have vsftpd as a server. You don't make clear if your users are virtual users or real (system) users; the latter are ones that have been added on the system using useradd / adduser.

I don't have experience with virtual users, so can't help you there. If your users are real users, you can follow the vsftpd configuration as described in chapter 14 in http://www.brennan.id.au/; that site describes a setup for fedora, but might be useful for Centos as well; I used parts of it for my Slackware servers.

You might need to create a symlink in each user's home directory to a www folder.

My setup is probably different from the standard setups that come with distros; webpages don't belong in /var in my opinion, so I use the user's home directories (and configure apache accordingly).
Code:
/home
  +---website1
  |      +---inc
  |      +---web
  +---website2
  |      +---inc
  |      +---web
  |           +---directory_where_apache_can_write
If you use the same approach, the document root for each website in apache needs to point to the respective web directory (/home/websiteX/web).
The inc directory (for include) is there for files that e.g. contain login credentials for a database; visitors of a website can't access them by enetering a URL but apache can (make sure permissions allow apache to read both inc and web.
Disadvantage of the approach might be that apache can not write in the user's home directories; I therefor always create a subdirectory in the web directory where apache can write.

Also make sure that the real users can not snoop around in the system by jailing them to their home directories; if it's not explained in the link that I provided, you can ask.

Last thing is that I don't allow users to login using telnet/ssh so they can't snoop around in the system that way.

Last edited by Wim Sturkenboom; 08-04-2010 at 01:01 AM.
 
  


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
ftp user can't create a directory on ftp server bharatlalgupta Red Hat 4 01-27-2010 01:58 PM
Need to create a restricted user(Centos) ankushpandit Linux - Newbie 7 09-10-2009 09:24 AM
How do I create a new FTP user? lupus6x9 Linux - Newbie 1 09-01-2008 09:15 PM
'553 Could not create file' in vsftpd FTP Server on CentOS 5 Fabian10 Linux - Server 2 11-26-2007 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:05 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