LinuxQuestions.org
Register a domain and help support LQ
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 12-27-2009, 05:56 PM   #1
carlodelmundo
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Rep: Reputation: 0
Jail users using vsFTPD (help)


Hi.

I've been messing with CentOs 5 (pure command line). I've managed to install vsftpd, as a FTP server, but now the next step is to jail users within their /home/ directory.

For example, if I useradd a user named 'newUser', I want this user to be sustained only in /home/newUser/ .

I've read something about chroot.... it's similar but I don't think this is the correct command.

What should I be looking at?
 
Old 12-27-2009, 06:24 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Edit vsftpd.conf and add or uncomment the following line:
Code:
chroot_local_user=YES
Or you can post the vsftpd.conf file, so we could help you better on this

Regards
 
1 members found this post helpful.
Old 12-28-2009, 01:19 AM   #3
carlodelmundo
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks!

What's the benefit for NOT chrooting the directory? I can imagine that FTP users don't need to see the / directory.

Also, where can I find the manual for vsftpd? I find the one provided in the vsftpd site is misleading and non-helpful.
 
Old 12-28-2009, 04:07 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

With chroot to his homedir, a user cannot read other users files, or the system files. So if an account is compromised, there will be little to no harm to the rest of a system.
You can read the redhat documentation for vsftpd, here

Regards
 
1 members found this post helpful.
Old 12-28-2009, 09:03 AM   #5
carlodelmundo
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks... but I was talking about the other case. Why would vsftpd leave a chroot_local_dir option to NO by default when this is a security NO NO?

Thank you for the link also! This is helpful!
 
Old 12-28-2009, 09:53 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Here is an explanation why the default setting is NO (quote from vsftpdrocks.org):
Quote:
Q) Help! What are the security implications referred to in the
"chroot_local_user" option?
A) Firstly note that other ftp daemons have the same implications. It is a
generic problem.
The problem isn't too severe, but it is this: Some people have FTP user
accounts which are not trusted to have full shell access. If these
accounts can also upload files, there is a small risk. A bad user now has
control of the filesystem root, which is their home directory. The ftp
daemon might cause some config file to be read - e.g. /etc/some_file. With
chroot(), this file is now under the control of the user. vsftpd is
careful in this area. But, the system's libc might want to open locale
config files or other settings...
 
Old 12-28-2009, 11:26 AM   #7
carlodelmundo
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks man!
 
  


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
vsftpd will not jail remote user kipthomas Linux - Software 3 09-10-2005 12:38 AM
chroot jail for the vsftpd daemon -not internal to program snowmedia Linux - Networking 2 06-30-2004 10:32 AM
vsftpd, combining chroot jail & links? Whz Linux - Software 0 07-25-2003 05:31 PM
Help with chroot jail - vsFTPd r042wal Linux - Software 1 06-05-2003 05:21 PM
vsftpd + redhat8 + jail Delvar Linux - Software 3 03-28-2003 12:13 AM


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