Operating System - HP-UX
1851092 Members
2753 Online
104056 Solutions
New Discussion

Problem with ftp and chroot jail

 
SOLVED
Go to solution
Phil2 Davey
Occasional Advisor

Problem with ftp and chroot jail

I am trying to set up a restricted ftp user and have followed the instructions in most of the forums but the chroot isn't working.
/etc/passwd entry:
ftpuser:*:661:661:FTP \ User,,,:/home/ftpuser/./:/usr/bin/false
Group file contains:
ftpuser::661:
/etc/shells contains:
/usr/bin/false
/etc/ftpd/ftpaccess contains:
guestuser ftpuser
.
When I ftp to the account, pwd shows the full path and I can cd to /.

I have obviously missed something, but I don't know what. Help or advise please?
6 REPLIES 6
likid0
Honored Contributor

Re: Problem with ftp and chroot jail

are you using the -a option in the inetd.conf so it reads the ftpaccess file ?
Windows?, no thanks
Rita C Workman
Honored Contributor

Re: Problem with ftp and chroot jail

Is it guestuser or guestgroup?
What group is ftpuser in?

...and have you considered "ssh" for your ftp access (sftp)? With this you get the added feature of encryption -and- when I set this up on our ftp-only (chrooted) server there was such a nice utility called: ssh_chroot_setup.sh.

Just a thought,
Rgrds,
Rita
Phil2 Davey
Occasional Advisor

Re: Problem with ftp and chroot jail

Thank you both for your responses, however...
inetd.conf entry:
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a -u 111

I would prefer sftp, but the customer has a requirement to use ftp, so my hands are tied.
Phil2 Davey
Occasional Advisor

Re: Problem with ftp and chroot jail

Rita,

Having re-read your reply, I noticed that you mentioned guestgroup rather than guestuser. Since I had just plagiarized that from another thread, I did not question its accuracy, but you were correct, and it should have been guestgroup.

Please post another reply so I can give you the points you deserve.
Rita C Workman
Honored Contributor
Solution

Re: Problem with ftp and chroot jail

No problem...glad it helped !

Rgrds,
Rita
Phil2 Davey
Occasional Advisor

Re: Problem with ftp and chroot jail

Rita has pointed me in the right direction. Again many thanks.