Operating System - HP-UX
1833784 Members
4207 Online
110063 Solutions
New Discussion

How to restrict ftp user to access files

 
j773303
Super Advisor

How to restrict ftp user to access files

As title, when user ftp to unix server, could
it be possible restrict the user only access
/home directory?
Hero
5 REPLIES 5
Roberto Martinez_6
Frequent Advisor

Re: How to restrict ftp user to access files

You can configure the system for anonymous ftp access, which will restrict a lot access to your system. Have a look to ftpd man page (hpux11), it explains step by step how to do it.
It wasn't me
Robert-Jan Goossens
Honored Contributor

Re: How to restrict ftp user to access files

Hi,

Take a look at next question it will help you.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x3b9093e260b0d611abdb0090277a778c,00.html

Robert-Jan.
T G Manikandan
Honored Contributor

Re: How to restrict ftp user to access files

Yogeeraj_1
Honored Contributor

Re: How to restrict ftp user to access files

hi,

Step-by-step (as the root user)

1. cp /usr/newconfig/etc/ftpd/ftpaccess
/etc/ftpd/ftpaccess

2. create a group for ftp users called ftponly

3. create the new ftp user (say yogeeraj) and restrict hime to /home/yogeeraj

useradd -m -d /home/yogeeraj -s /usr/bin/false -g ftponly yogeeraj

4. Add this false shell to the file (just add the /usr/bin/false line to the file)

5. Change the /etc/inetd.conf file (the ftp line) to read:
ftp tcp stream nowait root /usr/lbin/ftpd ftpd -a

6. Now edit the /etc/passwd file and change the directory setting for the user: add /./ at the back of the directory

(if the line used to read:
yogeeraj:98732jgjh:100:103::/home/yogeeraj:/usr/bin/false

Make it :

yogeeraj:98732jgjh:100:103::/home/yogeeraj/./:/usr/bin/false

7. Restart inetd "inetd -c"

That should be it

also take a look at the thread below on how to setup ftpaccess on your system.

http://us-support.external.hp.com/cki/bin/doc.pl/sid=f3889157083aef0a6e/screen=ckiDisplayDocument?docId=500000000092476


hth
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Balaji N
Honored Contributor

Re: How to restrict ftp user to access files

man ftpaccess.
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.