Operating System - HP-UX
1834752 Members
2993 Online
110070 Solutions
New Discussion

Re: how to restrct ftp user in it's home dircetory

 
huaxiang
Frequent Advisor

how to restrct ftp user in it's home dircetory

below is steps to config,but not work,what is the problem?

1、create user ftp1: ftp1:xEq5dyLS7CrfA:800:106::/cj/ftp1/./:/sbin/false
2、vi shells:
/sbin/sh
/usr/bin/sh
/sbin/false
/usr/bin/false
#/sbin/false
/usr/bin/ksh

3. Configure the ftpaccess file:

a. cd /etc/ftpd

b. cp -p /usr/newconfig/etc/ftpd/ftpaccess .

c. vi ftpaccess. At the bottom of the file there is a guestgroup
directive 'guestgroup ftptest'.
4、Modify the /etc/inetd.conf file to enable the use of the ftpaccess
file:

a. vi /etc/inetd.conf

b. Add the -a flag to the ftp daemon.

c. ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -a -l //× tcp6 ,not tcp
d. /usr/sbin/inetd -c
5、copy file
a. cd /cj/ftp1
$mkdir -p usr/bin
$cp /sbin/ls usr/bin
$cp /bin/pwd usr/bin
6、 vi /etc/group
add
"ftptest::106:ftp1"

7、 os version: 11.31
4 REPLIES 4
Steven Schweda
Honored Contributor

Re: how to restrct ftp user in it's home dircetory

What, exactly, does "not work" mean here?
huaxiang
Frequent Advisor

Re: how to restrct ftp user in it's home dircetory

the ftp user was not restricted in it's home directory, can move everywhere.
Ivan Krastev
Honored Contributor

Re: how to restrct ftp user in it's home dircetory

User shell is /sbin/false, but in /etc/shells it is commented out.

Set shell to /usr/bin/false for example.

regards,
ivan
huaxiang
Frequent Advisor

Re: how to restrct ftp user in it's home dircetory

problem solved, wrong typing.thank u all