Restricting ftp access

Hi!
I'm running Linux redhat 4.2 (2.0.30) with wu-2.4.2 BETA-15.
What I would like to is to restrict the users access to
their home dirs only. They should not be able to browse the
entire filesystem. Is there any way to do this?
I have tried putting the homedir in /etc/passwd to:
"/home/user/./" but they can still access
other directories.  
frosty_awAsked:
Who is Participating?
 
unicorntechConnect With a Mentor Commented:
I would do this by setting the home dir to whatever you want eg.
/home/username and making the /home dir not readable or writeable for any user other than root. Then I would make sure the individual user dir was readable and writeable for that user only.
if this is not suitable then from the man dpage:
FTPD authenticates user based on 5 rules:

5. If the user name appears in the file /etc/ftpchroot, or the                user is a member of a group with a group entry in this file,
 to the user's login directory by chroot(2) as for an               ``anonymous'' or ``ftp'' account (see next item).  This facil-
ity may also be triggered by enabling the boolean "ftp-chroot"
capability in login.conf(5).  However, the user must still
supply a password.  This feature is intended as a compromise
between a fully anonymous account and a fully privileged ac-
count.  The account should also be set up as for an anonymous
account.            

See the man pages on ftpd and on ftp-chroot for more info.

Hope this helps,

Jason        
0
 
df020797Commented:
This can be achieved by chrooting them when they enter their account via ftp. Tjis has been described for wu.ftpd in a HTML document, but I forgot the URL :-/ Try Altavista, I KNOW there is a description or HOWTO for it.
0
 
jetxCommented:
why not try setting the other directory to suid root :)


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.