1824976 Members
3864 Online
109678 Solutions
New Discussion юеВ

Re: FTP Issue

 
SOLVED
Go to solution
Anshumali
Esteemed Contributor

FTP Issue

Hi,

I have setup a user as restricted FTP use.
1. The config works fine and user is unable to switch the directory as we desired.
2. The home directory works as chrooted dir and user see the contents only below that as desired.

Issue is:
1. When we initiate FTP from windows FTP client, the connection establishes and then issue of ls command shows that file listings.But ftp from another hpux box for the same account, logs in well but when we do the ls command, there is no data shown.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
226 Transfer complete ---No Data
ftp>
2. Any of the GUI client like WS_FTP and other also doesnt show any data but they connect fine.

3. Same from windows FTP gives the required o/p/
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
-----files comes----

Any help? :)

Thanks
Anshu
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
6 REPLIES 6
Ludovic Derlyn
Esteemed Contributor

Re: FTP Issue

hi,

Just an suggest:

Are you sure of your command is ls
in my case, with ftp chroot, ls is a link to command dir

Check for you if it's not the same item.

Regards
L-DERLYN
Steven E. Protter
Exalted Contributor

Re: FTP Issue

Shalom,

Check the permissions of the chrooted ls command. Its probably not correctly owned.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Anshumali
Esteemed Contributor

Re: FTP Issue

Shalom,

I hope this is the cause. I see the permission as /usr/bin/ls on the FTP Server as
-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/ls

What/where i need to put as a chrooted command. The restristed user falls into FTP only group. Looks like i am missing something, but where....... :(
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Ludovic Derlyn
Esteemed Contributor
Solution

Re: FTP Issue

hi,

Missing is the copy of /usr/bin/ls to chroot directory

regards

L-DERLYN
Anshumali
Esteemed Contributor

Re: FTP Issue

Perfect!!
SEP i couldnt assign points to you again, though you both were right in your approach.

Thanks,
Anshu
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Anshumali
Esteemed Contributor

Re: FTP Issue

Putting the copy of the ls command in chrooted directory solved the issue.
Cheers!
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!