Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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/*.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.