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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
unicorntechCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.