Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odd FTP issue...comments appreciated

Status
Not open for further replies.

themoe

MIS
Jul 27, 2002
20
0
0
US
Ok AIXers, in keeping with a promise to only post creative issues for discussion I have an odd ftp problem.

36182 67394 0 17:19:03 pts/0 0:00 grep ftp
root 43958 1 0 Jul 22 - 0:00 /usr/sbin/tftpd -n
nobody 86926 43958 0 Jul 22 - 0:00 /usr/sbin/tftpd -n

$ ls -al /usr/bin/ftp
-r-sr-xr-x 1 bin bin 236194 Feb 27 2001 /usr/bin/ftp
$

I attempt to start the ftp service via SMIT. I get the "ok" and no error messages.
If I view it via SMIT it shows as inoperative.

/etc/ftpusers is empty

There is no comment in /etc/inetd.conf

I attempt to ftp and the command just does nothing and I get the normal shell prompt again.

I can ftp into the machine in question and telnet works just fine.

Ideas?

I am new to AIX but not unix in general…
 
netstat -an | grep LISTEN

See if anything is listening on port 21.
 
Yes,
tcp 0 0 *.21 *.* LISTEN

Sorry I didn't mention that...remember I CAN accept ftp sessions. [from a second aix server.]
 
You can start subsystems from the command line via
`startsrc -s tftpd` and `stopsrc -s tftpd`.
Do an `lssrc -a | grep ftp` and you should get back what you are seeing on your screen and see that it is either operative or in your case inoperative.
Try to connect to the host you want to connect to by explicitly using tn host 21 and see what you get.
 
root@server / > lssrc -a | grep ftp
tftpd tcpip inoperative

root@server / > startsrc -s tftpd
0513-059 The tftpd Subsystem has been started. Subsystem PID is 17574.

root@server / > ps -ef |grep 17574
root 59964 53056 0 20:52:29 pts/0 0:00 grep 17574

root@server / > lssrc -a | grep ftp
tftpd tcpip inoperative


--------------
THEN
--------------
me@admin /home/me> tn neunet 21
Trying...
Connected to server.
Escape character is '^T'.
220 server FTP server (Version 4.1 Tue May 15 16:38:46 CDT 2001) ready.


blargh!
 
Don't you have this line in your inetd.conf?

tftp dgram udp6 SRC nobody /usr/sbin/tftpd tftpd -n

What it seems like tftp uses udp instead of tcp as communication protocol, so using telnet neunet 21 isn't going to cut it for you.

But then I'm not an expert, just adding my bit to the barrel.... IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
 
from /etc/inetd.conf....

ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd

tftp dgram udp6 SRC nobody /usr/sbin/tftpd tftpd -n

I rebooted my box last night, had to. I kinda thought that it might realese the ftp issue. No dice...it came up fine but ftp still doe not go.

I took this box over about 2 weeks ago and it really wasn't put together in the best of ways. Think I should reinstall ftp?
 
Have you checked there is no .netrc file in your home directory containing an init macro

If one exists - rename it as netrc (remove the full stop) and try your ftp command again








 
oqurum-

No..no .netrc files at all.

Told you guys this was odd...
 
Here is the bos info...

Fileset Level Action Status Date Time
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.net.tcp.client
4.3.3.75 COMMIT COMPLETE 02/18/02 11:07:14

Path: /etc/objrepos
bos.net.tcp.client
4.3.3.75 COMMIT COMPLETE 02/18/02 11:07:28
 
My two cents, edited slightly of course...

>ps -ef|grep ftp
root 35852 32492 2 13:12:05 pts/1 0:00 grep ftp
yourstruly@mybox:/utc/home/yourstruly>ftp anotherbox
Connected to anotherbox.no.way.com.
220 unixweb FTP server (Version 4.1 Tue May 15 16:38:46 CDT 2001) ready.
Name (h:u): yourstruly
331 Password required for yt.
Password:
230 User yourst logged in.
ftp> bye

>ls -al /usr/bin/ftp
-r-sr-xr-x 1 root system 236194 Feb 27 2001 /usr/bin/ftp

>lssrc -a|grep ftp
tftpd tcpip inoperative

>netstat -an|grep LISTEN|grep 21
tcp 0 0 *.21 *.* LISTEN

>grep ftp /etc/inetd.conf
ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd
#tftp dgram udp6 SRC nobody /usr/sbin/tftpd tftpd -n

So mine should not work, either. IBM Certified -- AIX 4.3 Obfuscation
 
Ok now get this...

I moved /usr/bin/ftp to /tmp/ftp.server.broken

and on a whim tried it...and it worked.

SO now all the above still counts..but the program will only run outside of /usr/bin

 
If you move something and it works it is usually a permission problem on a directory, file, or owner or group....I have the directory at bin and bin and the below permissions
but I have the owner and group of ftp as root and system? Perhaps?

#which ftp
/usr/bin/ftp

#cd /usr/bin
#ls -ld /usr/bin
drwxr-xr-x 4 bin bin 9216 Nov 16 2001 /usr/bin

#ls -la ftp
-r-sr-xr-x 1 root system 236194 Feb 27 2001 ftp
At 4.3.3 I have root and system as the owner and group?

 
It's not a problem with the subsystem part but apparently the client won't start up most likely due to at lib/permission problem.

What is the output of the following:

# which ftp

# /tmp/ftp.server.broken

What happens if you do it as another user??

If as one suggested, the filesystem was mounted "nosuid" this would probably cause problems with a lot of other programs??

Henrik Morsing
Certified 4.3 Systems Administration
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top