1833062 Members
2761 Online
110049 Solutions
New Discussion

Re: Bizarre FTP behavior

 
SOLVED
Go to solution
Matt Hearn
Regular Advisor

Bizarre FTP behavior

Greetings! I have an AMTrix application account that I'm trying to use to connect to an FTP proxy. When I just FTP to a server on our network (that doesn't require the proxy), I get right in (facilitated by .netrc). However, when I ftp to the proxy server, it just hangs after the 220 connection message and banner, never giving a prompt for a username.

Other users (root and personal accounts, including a DIFFERENT AMTrix account) get the username prompt and can type the username@host.domain string and do what they wish.

I've been comparing profiles and .*shrc files but I'm not seeing anything obvious. Has anyone run into something like this and can anyone point me towards the source of the problem?

Many thanks!!!!
12 REPLIES 12
Bharat Katkar
Honored Contributor

Re: Bizarre FTP behavior

Check your /etc/ftpd/ftpusers file. Users listed in this file are denied access to FTP.

Regards,
You need to know a lot to actually know how little you know
Matt Hearn
Regular Advisor

Re: Bizarre FTP behavior

re: ftpusers

That is indeed the case for someone trying to get INTO my server. The problem at hand is with people getting OUT.

Also, I'm not running ftp (out of inetd.conf) using the -a option, which is what causes it to read ftpusers.

Just the same, I checked the file, and it's empty.

Thanks!
Mel Burslan
Honored Contributor

Re: Bizarre FTP behavior

I don't think that I understood yor problem clearly but if you are not even getting a username query, I do not believe you are getting connected to this server.

to check if the connectivity is getting established, make sure you are running inetd with logging enabled, i.e.,

ps -ef | grep inetd

you should see a like with "inetd -l"

if you see just an "inetd" without -l option, do the following

/usr/sbin/inetd -k # to kill inetd
/usr/sbin/inetd -l # restart with logging enabled

then on a separate telnet instance, run command :

tail -f /var/adm/syslog/syslog.log

then try to establish your ftp session and you should see a line getting logged at this very same second. If not, the problem is not with ftp but with connectivity via your proxy.

Also if you can draw a rough picture of your environment like

client --> proxy --> ftp server

or what have you, it would help all of us understand the situation better.
________________________________
UNIX because I majored in cryptology...
Bharat Katkar
Honored Contributor

Re: Bizarre FTP behavior

Well same can checked at Proxy Server's end.

You need to know a lot to actually know how little you know
Mel Burslan
Honored Contributor

Re: Bizarre FTP behavior

aaaah, your ftp client is having the problem... sorry we were typing at the same time so I did not see your response before posting my previous note

so your picture is something like :


hpux server --> ftp proxy --> anonymous ftp server

is this right ?

and only one user on this hpux server is not able to establish this connection and start ftp ing using user@host.com as his or her anonymous user id. Is this correct so far ?
________________________________
UNIX because I majored in cryptology...
Matt Hearn
Regular Advisor

Re: Bizarre FTP behavior

Yeah, that's the problem. The guy who's asking for help with this probably has access to the proxy server itself; I'll ask him to check his logs.
Sanjay_6
Honored Contributor

Re: Bizarre FTP behavior

Hi,

If the user id prompt itself is not soming, then it rules out anything to do with the id itself. Maybe this has something to do with the reverse name resolution or reverse lookoup. FTP as well as telnet uses reverse lookout to resolve the ip address of the system / wks from where the connection is coming.

Hope this helps.

Regds
Matt Hearn
Regular Advisor

Re: Bizarre FTP behavior

True, Sanjay, but why would it be selective about users? Most of the users on the system are having no problem accessing the ftp proxy, just the one application account.

Thanks!
Sanjay_6
Honored Contributor
Solution

Re: Bizarre FTP behavior

Hi,

If this is particular to an id or two and works all right for other user ids at the same time from the same box, then it could be something to do with the user environment / permissions. if you have a .netrc file on any other file that you are using to automate ftp and all, rename them and try. Hope you have other user ids whose permissions level / security priv are the same as this id.

Hope this helps.

Regds
Matt Hearn
Regular Advisor

Re: Bizarre FTP behavior

Bingo! You're right, there's something screwy in the .netrc file. I was hesitant to move it out of the way (since I'm never sure who might be using it; there are a lot of old scripts using these application accounts), but I bit the bullet and did a quick test.

withouut the .netrc file there it connected just fine. So now I just need to figure out what's wrong with the .netrc file.

Thanks much!!!
Sanjay_6
Honored Contributor

Re: Bizarre FTP behavior

Hi,

Maybe, look for an entry for this proxy server in the .netrc file. Also check and see if there are any control characters in the file which might have been causing problems. Doing a cat does not display the control chanracters. Do a vi and it may show control characters in the file, if there are any.

Hope this helps.

Regds
Matt Hearn
Regular Advisor

Re: Bizarre FTP behavior

I only had to look for it like 11 times before i found the .netrc entry. Commented it out, everything works fine!

Thanks for all the help!