LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 05-16-2007, 01:42 PM   #1
madmike_5150
LQ Newbie
 
Registered: May 2007
Posts: 4

Rep: Reputation: 0
vsftpd - chroot_local_user=YES is not working


Guys,

I am running Ubuntu 6.10 server

I have been unable for the last day or so to get VSFTPd to chroot jail each user into their home dir. here is my vsftpd.conf file

==========================
listen=YES
local_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
tpd_banner=Welcome to mikes company sFTP service. Play nice!
chroot_local_user=YES
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
===========================

according to the FAQ for vsftpd and other sites all I have to do is add the following line to my vsftpd.conf file (as you can see it is already there)

"chroot_local_user=YES"


users are still able to browse up the directory tree.

Please help.

Thanks

MadMike
 
Old 05-17-2007, 05:56 AM   #2
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
Maybe a very silly suggestion, but did you restart the service?
 
Old 05-17-2007, 10:34 AM   #3
madmike_5150
LQ Newbie
 
Registered: May 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Wim Sturkenboom
Maybe a very silly suggestion, but did you restart the service?
great question and suggestion and yes the service was restarted several time as well as the server.

MadMike
 
Old 05-17-2007, 01:21 PM   #4
madmike_5150
LQ Newbie
 
Registered: May 2007
Posts: 4

Original Poster
Rep: Reputation: 0
In addition to the vsftpd.conf used above, I have tried several other options including the one found here http://www.linuxquestions.org/questi...d.php?t=180750

To no avail.

If anyone has any experience with this issue, please help.

Thanks!

MadMike
 
Old 05-17-2007, 02:38 PM   #5
0.o
Member
 
Registered: May 2004
Location: Raleigh, NC
Distribution: Debian, Solaris, HP-UX, AIX
Posts: 208

Rep: Reputation: 35
Quote:
Originally Posted by madmike_5150
In addition to the vsftpd.conf used above, I have tried several other options including the one found here http://www.linuxquestions.org/questi...d.php?t=180750

To no avail.

If anyone has any experience with this issue, please help.

Thanks!

MadMike

Do you have these directives enabled and populated?
http://vsftpd.beasts.org/vsftpd_conf.html

Quote:
chroot_list_file
The option is the name of a file containing a list of local users which will be placed in a chroot() jail in their home directory. This option is only relevant if the option chroot_list_enable is enabled. If the option chroot_local_user is enabled, then the list file becomes a list of users to NOT place in a chroot() jail.

Default: /etc/vsftpd.chroot_list

Last edited by 0.o; 05-17-2007 at 02:39 PM.
 
Old 05-17-2007, 03:54 PM   #6
madmike_5150
LQ Newbie
 
Registered: May 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Question

Quote:
Originally Posted by 0.o
Do you have these directives enabled and populated?
http://vsftpd.beasts.org/vsftpd_conf.html
Here is the modified config based on your suggestions and the ones that i have already tried.
=======================
listen=YES
local_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
tpd_banner=Welcome to mikes company sFTP service. Play nice!
#chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
========================

Located in the file /etc/vsftpd.chroot_list is the usernames that I WANT to be chrooted.

Once this config was applied and the service was restarted, those users can still successfully browse out of their home dirs.

MadMike
 
Old 05-21-2007, 12:25 PM   #7
0.o
Member
 
Registered: May 2004
Location: Raleigh, NC
Distribution: Debian, Solaris, HP-UX, AIX
Posts: 208

Rep: Reputation: 35
What does the list of users look like?
 
Old 05-21-2007, 09:33 PM   #8
ithawtewrong
Member
 
Registered: Jul 2004
Location: Mile High
Posts: 161

Rep: Reputation: 30
Here's some info for ya. Please note the chroot_list_enable option:

From the vsftpd.conf config file provided at install.

Code:
# You may restrict local users to their home directories.  See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list
How did you install vsftp on Ubuntu? I did the aptitude install vsftpd and it worked fine and the config file was commented with all the info I needed.
 
Old 05-23-2007, 10:50 AM   #9
madmike_5150
LQ Newbie
 
Registered: May 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Thumbs up

Guys,

After speaking to one of my team members, the issue is now determined to be caused by users logging in with SFTP versus FTP. You have to love communication!

Anyway all is well once again. Users that log into VSFTPd with FTP clients are indeed locked down in their home dirs.

MadMike


Quote:
Originally Posted by ithawtewrong
Here's some info for ya. Please note the chroot_list_enable option:

From the vsftpd.conf config file provided at install.

Code:
# You may restrict local users to their home directories.  See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list
How did you install vsftp on Ubuntu? I did the aptitude install vsftpd and it worked fine and the config file was commented with all the info I needed.
 
Old 05-24-2007, 12:22 AM   #10
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
I suppose that I don't have to suggest that you disable the sFTP in the ssh server config.
 
1 members found this post helpful.
  


Reply

Tags
vsftpd, vsftpdconf


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 not working pradsy90 Linux - Software 2 05-09-2008 09:19 AM
Can't get vsftpd working Kropotkin Linux - Networking 3 07-18-2005 02:23 PM
vsFTPd user's not working? paul_mat Linux - Networking 9 05-06-2005 01:00 AM
vsftpd "chroot_local_user=YES" not working gagda1 Linux - Networking 3 05-12-2004 08:02 PM
vsftpd umask not working k-bot Linux - Software 1 03-10-2004 04:29 PM


All times are GMT -5. The time now is 02:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration