1838243 Members
4640 Online
110125 Solutions
New Discussion

ftp problem

 
Domenico_5
Respected Contributor

ftp problem

Hi to all

I have configured ftpaccess and I have configured ftp for restriction for group guest.
If i try to connect from a windows client, all work correctly, but if I try to connect from a unix client (another server) I can't list any file
7 REPLIES 7
Rita C Workman
Honored Contributor

Re: ftp problem

Did you remember in the users' account to create a bin directory and then to copy under /home/usr/bin/ :

/sbin/ls
/usr/bin/pwd

This is talked about in other threads...you can Search for

My guess is...(note I said guess) that your FTP is really not secured.
What about chroot on your users account?
How did you set up your ~/ftpaccess file?
Did you set your permissions correctly?

Just a thought,
Rita
Rita C Workman
Honored Contributor

Re: ftp problem

Sorry typo...

Should say..copy to /home/user/bin the following files:

/sbin/ls
/usr/bin/pwd

Rita
Domenico_5
Respected Contributor

Re: ftp problem

Hi Rita

I did it all this step, but the problem is:

Why from windows it work fine and from another unix it don't works?

ftp or not ftp, this is the question.
(ftpHamlet!!)
H.Merijn Brand (procura
Honored Contributor

Re: ftp problem

What ftp client do you use? Does it support debugging? What messages does the host issue?

with perl using Net::FTP:


use Net::FTP;
my $ftp = Net::FTP->new ("unix.host.name", Debug => 9);

and maybe passive might help

my $ftp = Net::FTP->new ("unix.host.name", Debug => 9, Passive => 1);

Another thing that might influence the connection are the values for $SHELL and $TERM. FTP refuses connection if the default shell for the user is not known to ftpd and cannot be found in /etc/shells (if it exists). Note that not all clients pass the same information to the unix host.

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Christopher Caldwell
Honored Contributor

Re: ftp problem

From the client side, an ls (with no flags) issues the NLIST command on the server, which doesn't require the use of an external ls.

dir (ls -l) or any other flags issued with ls cause the external ls to be invoked.
If you don't have external ls set up correctly, these comands will return without listing anything.

Most of these problems stem from ls being incorrectly set up in chroot'd environments. You must copy /sbin/ls to
~chroot/bin/ls to get this to work.

If you want to see what's happening, add -v to the command switches on ftpd in inetd.conf to get debugging (debugs appear in syslog).
Domenico_5
Respected Contributor

Re: ftp problem

hi christopher

I have done all steps that you have wrote but it doesn't work.

But the question is: why if I run ftp from windows to unix ftpaccess work and if I run ftp on the same server or from another unix server ftpaccess doesn't work?

Christopher Caldwell
Honored Contributor

Re: ftp problem

>But the question is: why if I run ftp from windows to unix ftpaccess work and if I run ftp on the same server or from another unix server ftpaccess doesn't work?

The clients are using different commands to get directory listings; one's using nlist, the other's using dir or ls with flags.
nlist is internal to ftpd, dir or ls with flags calls an external ls.

Try nlist on the other Unix server instead of ls or dir. If nlist works, but ls doesn't then external ls isn't set up correctly.

The other place you might look is host based access - you can class users based on source IP. Check to make sure you're _not_ doing that.

If none of that works, post
-the entry in /etc/passwd for the guest user
-post an ll -d of the guest users home directory
-post an ll of the guest user's home directory
-post an ll of the _full_ path to the place where you put external ls