Discussion Locked

FTP: User Restriction

0 helpful
10 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have setup a Linux server on one of our sites and have created 5 users that can ftp to it. How can I restrict each user to access only his respective user directory and not others directory?
Need advice on this.

Thanks in advance.

10 replies

by ebob

'man chmod'

Then for each directory: chmod 600, or chmod 640, or etc. as required.

by cjcknight

if he does a cd / he will be redirected to the root directory how can i permit him this. Using Windows NT 4.0, I have setup 10 ftp sites where each user cannot access each others directory even if he issues a cd command and if cd / was issued he will be redirected to a virutal root directory. I hope this is possible with Linux because I don't want to go back to Windows because it always gives me pain.

by valachi

By seeting up a simple text file: /etc/ftpusers - a list of accounts that are DISALLOWED the ftp access. There are some more restrictions that you might want to set in place - check the /usr/doc/HOWTO (in RH)
In order to not allow the users to movearound, please read the manual pages for the ftpd. It's a good ideea to allow only anonymous access which can restrict the users to a single directory (to the anonymous user's directory - ftp account). In the manual page you will find some very sanerecommendations.

by lintadsl

I assume you have RedHat and using wu-ftp.

You need to install anon-ftp rpm as well. It helps you and does lots of work^^.
You can tell where you want to insatll.
For my seting is I installed under /home/ftp.
Then all my clients are accessingto under /home/ftp/ They can not go top of home/ftp. There are some setting on configurations in /etc/ftpaccess and you need to copy /etc/passwd to /home/ftp/etc/ (/home/ftp/etc folder will be created by anon ftp).

You will figure it out once you find a right(?) doc but please read some docs before contect me ^^ . You need a help to do this, let me know. my email add. is sunnyj@meridian-corp.com

Good luck,

by madhumurty

check the man page of ftpaccess and make the necessary changes to ftpaccess..especially check the restricted uid and gid part of it and creating a group with all the users so that you can restrict them based on their home directory...check man ftpaccess!!!
all the best
mm

This discussion is closed to new replies.