Operating System - HP-UX
1753872 Members
7532 Online
108809 Solutions
New Discussion юеВ

B11.23 restricted ftp access and "ls" issue

 
SOLVED
Go to solution
Lor
Frequent Advisor

B11.23 restricted ftp access and "ls" issue

I have implemented successfully chrooted restricted ftp access but still face an issue with "ls" command.
~ftp/usr/bin directory was created and "/bin/ls" copied but in vain.
nlist command works but "ls" does not.

Session shows :`
.... Access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/" is current directory.
ftp> nlist
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
test_file
226 Transfer complete.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
226 Transfer complete.

Suggestion on how to troubleshoot this issue would be appreciated.Thanks.
3 REPLIES 3
Michael Steele_2
Honored Contributor

Re: B11.23 restricted ftp access and "ls" issue

Reload ftp. Use swlist -l fileset | grep -i ftp. Note the product / packages, get an installation cd and reinstall.
Support Fatherhood - Stop Family Law
Steven Schweda
Honored Contributor
Solution

Re: B11.23 restricted ftp access and "ls" issue

> ~ftp/usr/bin directory was created and
> "/bin/ls" copied but in vain.

Did you get all the required run-time
libraries, too? You may be able to use
/usr/sbin/chroot for more interactive testing
(perhaps with better error messages).

"man 1m chroot"

Or, try copying "/sbin/ls" (and its friends)
instead of "/usr/bin/ls".

td192> ls -l /usr/bin/ls /sbin/ls
-r-xr-xr-x 1 bin bin 294912 May 5 2003 /sbin/ls
-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/ls

One of them may be a bit more self-contained
than the other.
Lor
Frequent Advisor

Re: B11.23 restricted ftp access and "ls" issue

Steven is correct.
Using /sbin/ls solves the issue.
10 points assigned.