LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to create ftp user id in Centos (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-ftp-user-id-in-centos-823430/)

solutionsdxb 08-01-2010 04:30 PM

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

paulsm4 08-01-2010 08:51 PM

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

solutionsdxb 08-02-2010 01:00 AM

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

paulsm4 08-02-2010 01:12 AM

One Pop Favorite for Centos is this:

Quote:

rpm -qa |grep -i ftp

solutionsdxb 08-02-2010 03:08 PM

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

solutionsdxb 08-03-2010 08:59 AM

please help

solutionsdxb 08-03-2010 05:25 PM

is there any body to help , the whole linux form does not have any body who can help me in this please

Wim Sturkenboom 08-04-2010 12:59 AM

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.


All times are GMT -5. The time now is 01:48 AM.