LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-06-2005, 04:27 AM   #1
MisterESauce
Member
 
Registered: Nov 2004
Distribution: FC3 dualboot with XP on my main machine, Slackware 9 on my POS ;)
Posts: 30

Rep: Reputation: 15
creating a secure ftp server with chrooting


okay, here's my problem: i'm creating a secure file server with cent os and i want to chroot users to their home directories in a secure manner (one that is not too easy to break out of). my problem is that i don't really know how to approach this. i've read a whole bunch of advice on various sites about how to do this properly but none seem to go through the whole procedure.

i would like to allow ONLY secured ftp traffic (no telnet, ftp, etc) and no anonymous or root access (the intent is to allow clients to access sensitive files from their homes via ftp). i also want each user to only have access to their own files (in their home directory). the only permissions these users need is to copy files to and from this directory and to perform basic directory operations (list files, remove files, etc).

please someone, what is the best way to do this? i'm inclined to use vsftpd because of its ease of chrooting but this requires a lot of setup with my current install (xinetd is in control and i don't know how to change it from using sshd). on the other hand i've also written a rudimentary chroot script which could be applied to all users logging in with sshd but i'm not sure how to make it run on login and so forth.

any suggestions would be GREATLY appreciated! thanks in advance!
 
Old 04-06-2005, 02:16 PM   #2
MisterESauce
Member
 
Registered: Nov 2004
Distribution: FC3 dualboot with XP on my main machine, Slackware 9 on my POS ;)
Posts: 30

Original Poster
Rep: Reputation: 15
pardon my blatant bump but i'm still at a loss, does anyone have any ideas?
 
Old 04-06-2005, 03:36 PM   #3
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
never donne this but in sshd_config

# override default of no subsystems
Subsystem sftp "sudo /usr/sbin/vsftpd"

then only configure this file correctly: /etc/sudoers
configure vsftpd and i think it will work
 
Old 04-06-2005, 07:58 PM   #4
MisterESauce
Member
 
Registered: Nov 2004
Distribution: FC3 dualboot with XP on my main machine, Slackware 9 on my POS ;)
Posts: 30

Original Poster
Rep: Reputation: 15
thanks, but that didn't do it. sshd won't start with that line at the end, calling it "garbage at the end of the line"... perhaps you can't sudo from sshd_config?
 
Old 04-07-2005, 01:46 AM   #5
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
then i can't see any other option ,

you have to run vsftpd as root.


do it with sftp-server and make a script to chroot-jailling the users
 
Old 04-07-2005, 04:43 AM   #6
MisterESauce
Member
 
Registered: Nov 2004
Distribution: FC3 dualboot with XP on my main machine, Slackware 9 on my POS ;)
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by thermite_1033

do it with sftp-server and make a script to chroot-jailling the users
i don't understand what you're saying here. what is sftp-server and what should i do with it? i did write a script to chroot users but i'm not sure how to apply it to ssh or vsftp (probably wouldn't need it with vsftp though because it has a builtin chroot function, right?)

anyway, thanks very much again! i am making some progress, better than nothing!
 
Old 04-07-2005, 11:22 AM   #7
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
in sshd_config this is when you want a secure ftp as subsystem. you acually don't need an other ftp-daemon but i don't know if you even can configure it. i can't find any config-file.
but this hasn't got a chroot!!!

# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server

you can apply your chroot-script in every user-home, i don't know exactly how your script looks like so i cant tell you how to apply it
 
  


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
creating a secure ftp-based backup account? evank Linux - Security 3 11-30-2005 12:44 AM
Creating an FTP Server on Fedora 3 Ja5onB Linux - Newbie 5 07-22-2005 03:39 AM
Server Security and Chrooting LinuxGeek Linux - Security 4 10-25-2004 01:23 PM
How to make a secure ftp server ? exalik Linux - Security 3 09-05-2003 04:21 AM
secure ftp server j-me Linux - Software 3 04-18-2003 11:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:09 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
Open Source Consulting | Domain Registration