LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-31-2006, 03:00 PM   #1
scorbett
Member
 
Registered: May 2002
Location: Canada
Distribution: Slackware, Mandriva, RedHat
Posts: 46

Rep: Reputation: 15
Question about vsftpd security (or just ftp in general)


In the man page for vsftpd.conf, I find the following note:

Quote:
chroot_local_user

If set to YES, local users will be (by default) placed in a chroot() jail in their home
directory after login. Warning: This option has security implications, especially if the
users have upload permission, or shell access. Only enable if you know what you are doing.
Note that these security implications are not vsftpd specific. They apply to all FTP dae-
mons which offer to put local users in chroot() jails.

Default: NO
Can anyone explain to me exactly what those security implications are? I want to allow local users to be able to ftp in to their home directories (and only to their home directories) to be able to upload/download stuff. Some users will also have a public_html directory that will be web-accessible. No one except me will have telnet or ssh access.

The rather cryptic wording of the above warning note in the man page has me curious - the only security implication I can think of is that users would be able to upload stuff to their public_html directory to make it web accessible, but that's the whole idea. Am I missing something? Am I about to open a glaring security hole on my server?
 
Old 03-31-2006, 04:35 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by scorbett
In the man page for vsftpd.conf, I find the following note:
Code:
chroot_local_user

If set to YES, local users will be (by default) placed in a chroot() jail in their home
directory after login. Warning: This option has security implications, especially if the
users have upload permission, or shell access. Only enable if you know what you are doing.
Note that these security implications are not vsftpd specific. They apply to all FTP dae-
mons which offer to put local users in chroot() jails.

Default: NO
Can anyone explain to me exactly what those security implications are? I want to allow local users to be able to ftp in to their home directories (and only to their home directories) to be able to upload/download stuff. Some users will also have a public_html directory that will be web-accessible. No one except me will have telnet or ssh access.

The rather cryptic wording of the above warning note in the man page has me curious - the only security implication I can think of is that users would be able to upload stuff to their public_html directory to make it web accessible, but that's the whole idea. Am I missing something? Am I about to open a glaring security hole on my server?
i'm not sure, but it sounds like the text might be trying to say the inverse of what you've interpreted... like, it might be saying that by using that option you will be "clamping-down" on users with stricter security... and more security usually means less usability, which i think is what is being talked about here...

Last edited by win32sux; 03-31-2006 at 04:36 PM.
 
Old 03-31-2006, 04:46 PM   #3
dopehouse
Member
 
Registered: May 2004
Location: Hildesheim(Germany)
Distribution: Debian Etch with Kernel 2.6.x (latest vanila)
Posts: 62

Rep: Reputation: 15
The problem is that with normal ftp your password and username is transfered in cleartext over the net. So you should setup an sftp server, which uses ssl to encrypt the communication.
 
Old 03-31-2006, 04:46 PM   #4
scorbett
Member
 
Registered: May 2002
Location: Canada
Distribution: Slackware, Mandriva, RedHat
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by win32sux
i'm not sure, but it sounds like the text might be trying to say the inverse of what you've interpreted... like, it might be saying that by using that option you will be "clamping-down" on users with stricter security... and more security usually means less usability, which i think is what is being talked about here...
If that's the case, then there's no problem here. I'd rather be too secure than not secure enough! Just from the way it's worded, though, it really sounds to me like you risk opening up a security hole by doing that. Maybe I'm just reading it wrong.
 
Old 03-31-2006, 04:47 PM   #5
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by dopehouse
The problem is that with normal ftp your password and username is transfered in cleartext over the net. So you should setup an sftp server, which uses ssl to encrypt the communication.
huh?? this has like *nothing* to do with the chroot question...
 
Old 03-31-2006, 04:48 PM   #6
scorbett
Member
 
Registered: May 2002
Location: Canada
Distribution: Slackware, Mandriva, RedHat
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dopehouse
The problem is that with normal ftp your password and username is transfered in cleartext over the net. So you should setup an sftp server, which uses ssl to encrypt the communication.
I already have an sftp server, but some of my users aren't very computer-literate and want to be able to use IE's built-in ftp capabilities so transfer their stuff, which is why I'm looking into settup up ftp as well.
 
Old 03-31-2006, 04:52 PM   #7
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by scorbett
If that's the case, then there's no problem here. I'd rather be too secure than not secure enough! Just from the way it's worded, though, it really sounds to me like you risk opening up a security hole by doing that. Maybe I'm just reading it wrong.
yeah, it is definitely worded kinda funny... then again, please remember that i am not 100% sure about my interpretation...

BTW, if you wanna harden your chroot jails (among other things) you can use grsecurity:

http://grsecurity.net/
 
Old 03-31-2006, 04:53 PM   #8
dopehouse
Member
 
Registered: May 2004
Location: Hildesheim(Germany)
Distribution: Debian Etch with Kernel 2.6.x (latest vanila)
Posts: 62

Rep: Reputation: 15
Quote:
Originally Posted by win32sux
huh?? this has like *nothing* to do with the chroot question...
Sorry. Next time I'll read the question twice
 
Old 03-31-2006, 04:56 PM   #9
dopehouse
Member
 
Registered: May 2004
Location: Hildesheim(Germany)
Distribution: Debian Etch with Kernel 2.6.x (latest vanila)
Posts: 62

Rep: Reputation: 15
Could it be because chroot have to run as root user? Not 100% sure.
 
  


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
General wireless security question zba78 Linux - Wireless Networking 3 03-17-2006 03:33 PM
question about home and ftp security nephish Linux - Networking 10 10-28-2005 12:08 AM
general FTP server question fatrandy13 Linux - Software 2 06-02-2005 03:23 PM
vsFTPd Security SolidSnake Linux - Software 0 12-16-2003 12:55 PM
Security in general NSKL Linux - Security 1 11-02-2002 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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