1755381 Members
3638 Online
108832 Solutions
New Discussion юеВ

FTP Options

 
SOLVED
Go to solution
Shahul
Esteemed Contributor

FTP Options

Hi

This is the continuation of my previous question. Now I restricted all users ftp connection thru /etc/ftpusers file and I have created one user particularly for ftp called "onlyftp" and I have put /usr/bin/rsh as it startup shell. Now what I want is he should not be able to move around after ftp connection established. He should play only in his home directory. How to set this??? Is there anyway to do this other than portable softwares??? Because of security prblm, anonymous ftp is not a choice for me.

Thanks in advance
Shahul
4 REPLIES 4
Vincent Stedema
Esteemed Contributor

Re: FTP Options

Hi Shahul,

In order to chroot the users environment, you have to set the home dir in the passwd file to something like /home/onlyftp/./

The ftp daemon will chroot to the home dir of the user when it sees the ./

Which version of HP-UX do you use?

Regards,

Vincent
Joseph C. Denman
Honored Contributor

Re: FTP Options

shahul,

I'm guessing 11.0 or greater.

You will need to set up ftpaccess.

man 4 ftpaccess

add the -a option to ftpd in the inetd.conf

man ftpd

Also, If you only want ftp for the user. The user should not have a valid shell. Instead, give the user a shell of /usr/bin/false and add this shell to /etc/shells.

Hope this helps.

...jcd...
If I had only read the instructions first??
Shahul
Esteemed Contributor

Re: FTP Options

Devnull,

I changed home directory as per ur advice. But no effect. Still he is able to change home directory after establishing FTP connection.

Joseph.. I am using HPUX 10.2. ftpaccess option is not there in this.

Expecting ur advice again

With rgds
SHahul
Vincent Stedema
Esteemed Contributor
Solution

Re: FTP Options

Hi Shahul,

If you're running hp-ux 10.20 you should consider installing wu-ftp. The ftpd version that comes with hp-ux 11.00 is based on this and is a lot more configurable than the ftpd that comes with 10.20.

The depot can be downloaded here:

http://hpux.cs.utah.edu/hppd/hpux/Networking/FTP/wu_ftpd-2.6.1/

Regards,

Vincent