LinuxQuestions.org
Visit Jeremy's Blog.
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 12-28-2001, 03:46 PM   #1
vcheah
Member
 
Registered: Nov 2001
Distribution: redhat 8.0
Posts: 110

Rep: Reputation: 15
FTP security


I start a FTP server.
When I login to the FTP account through WS_FTP
I am able to go to upper level of directory to view other account /home/user folder but cannot open it.
is there any way i can denied the user from going upper level.?
example
I own - /home/user1
as user1 i am able to go /home to view other directory but not execute. how to denied view /home/*.
 
Old 12-28-2001, 04:05 PM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
The best way would be to use chroot. This would make /home/user1 look like / to the user.

--jeremy
 
Old 12-28-2001, 04:09 PM   #3
vcheah
Member
 
Registered: Nov 2001
Distribution: redhat 8.0
Posts: 110

Original Poster
Rep: Reputation: 15
u mean place the user1
to the /user1
???
i don't get what you mean...
 
Old 12-31-2001, 04:29 PM   #4
infinity6
Member
 
Registered: Dec 2001
Posts: 66

Rep: Reputation: 15
This isn't exactly a step-by-step, but it gives you the general idea of how to chroot an environment.

http://www.redhat.com/support/resour.../guestftp.html
 
Old 01-04-2002, 03:56 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
also check the "rootjail" package, its excellent in helping set up a chroot environment.
 
Old 01-06-2002, 12:25 AM   #6
johnlee
Member
 
Registered: Oct 2001
Location: China
Distribution: RedHat 7.0
Posts: 43

Rep: Reputation: 15
Ftp Security

Dear Friend,

In wu-ftpd u can't do that you want to restrict your users to their home directires for this u have 2 options in wu-ftpd
1) use chroot 2) use rbash restricted shell but both are very difficult to implement here is very easy way for u just remove wu-ftpd server and install proftpd ftp server http://www.proftpd.com
just define in /etc/proftpd.conf a line

DefaultRoot ~

this single line will implement ftp jail for every user no can't go up
from his home direcotry when he login on ftp server and run pwd command he just see "/" so be happy and do it

Thanks and Regards

John Lee

thristydesert@hotmail.com
 
Old 01-06-2002, 04:13 AM   #7
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
You need to edit the /etc/ftpaccess file and add a line like the following:

restricted-uid user1

This will show the home directory as "/" and also keep them from cd'ing down a level (ie to "/home/").

If you have a bunch of users, you may want to change it to:

restricted-uid *
unrestricted-uid trusteduser

This will, by default, keep all the users in their own directory unless they are listed on the "unrestricted-uid" line. Take a look at the man page for ftpaccess for more info about restricting user access.


Speck
 
  


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
ftp security msamuels Linux - General 3 05-31-2005 11:58 PM
Help with ftp-server security zepplin611 Linux - Security 5 07-22-2004 06:30 PM
ftp security spate Linux - Software 1 01-19-2003 06:04 PM
FTP Security?? Milkman00 Linux - Software 3 08-10-2002 11:10 PM
FTP security ! chuck77 Linux - General 4 03-05-2002 12:09 AM

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

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