LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-08-2005, 03:52 PM   #1
Palula
Member
 
Registered: May 2005
Location: Brazil
Distribution: Fedore Core 3
Posts: 138

Rep: Reputation: 15
Vsftpd with non-system users


Hello all...

IŽd like to know if this is possible. IŽd like to serve FTP (through vsftpd) with several users (between 5 and 10). But the plot is that I donŽt need them to be system users. IŽd like to create a list of possible ftp, and ftp only, users.

I want them to be only ftp users. For example they canŽt login through the terminal, because they wonŽt have a user account. I just want them to login through the ftp service, have a password assigned to them, and have a folder with write and read permisions. And I want them to be jailed in the /var/ftp folder. They canŽt go to /var, for exmaple.

Hope you can help me...
Thanks in advance.
 
Old 11-08-2005, 04:46 PM   #2
Back_to_Linux
Member
 
Registered: Sep 2005
Location: PARIS
Distribution: Mandriva 10.0 Communoty
Posts: 117

Rep: Reputation: 15
for the list of user account, don't matter.
Just add user to the system, normaly, but make their uniq and default shell /usr/bin/ftp (at the end of the line which correcpond to them in the /etc/passwd).

To put them in a jail, "chroot" the directory :
put the tree they need and the program they need to be ftp client in the directory you prepare for ftp.
"chroot" these directory and when the user connect to the system (localy or remotely) they get a ftp prompt.
They connect to, and they fall in their root' directory (/ for them, /YOURPATH/ for real), with just a shell for ftp.
More information are discusses however on how to make it, but i just can put you in the right direction.
 
Old 11-08-2005, 07:40 PM   #3
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Rep: Reputation: 15
I posted wondering about the same thing ( http://www.linuxquestions.org/questi...hreadid=379667 ) and basically determined that the easiest way to do it was to setup the user on the system with no shell and set their homedir as the /ftp dir, then chroot them in vsftpd.

Someone did mention that you *might* be able to do it with pam but I wasn't able to find anything on it. It eneded up being just easier for me to add the user, assign them to /sbin/nologin and make their home dir /ftp
 
Old 11-09-2005, 12:41 PM   #4
Palula
Member
 
Registered: May 2005
Location: Brazil
Distribution: Fedore Core 3
Posts: 138

Original Poster
Rep: Reputation: 15
What would be the command line to chroot a directory?
 
Old 11-09-2005, 12:48 PM   #5
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Rep: Reputation: 15
Quote:
Originally posted by Palula
What would be the command line to chroot a directory?
There may be a command line way to do it, but I did it within vsftpd. Since I didn't want to be put in the chroot jail, I ignored the chroot_local_users option and instead used:

chroot_list_file=/etc/vsftpd.chroot_list

Then I edited the vsftpd.chroot_list (or create if you don't have it) and listed each local user I wanted to be chrooted. VSFTP will automatically lock them into their home directory, and if you set their homedir to be whatever dif you want the ftp users to be put in, it'll send them there and show the path as /
 
  


Reply



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
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
setting up users in VSFTPD true_atlantis Linux - Software 1 09-29-2004 02:28 PM
home users with vsftpd swobodin Linux - Software 1 02-15-2004 08:35 AM
vsftpd and virtual users JeffV Linux - Software 2 11-14-2003 09:47 AM
vsFTPd users question ghight Linux - Software 1 11-06-2003 11:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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
Open Source Consulting | Domain Registration