LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   "ftp" not working anymore (https://www.linuxquestions.org/questions/slackware-14/ftp-not-working-anymore-455732/)

nykey 06-17-2006 02:04 PM

"ftp" not working anymore
 
I don't know for what reason the "ftp" command isn't working anymore. I have to use lftp or ncftp to connect to a host. I can live with that but why I post the thread is to find out why it stopped working to know for later times. I can't list the changes I've done lately cause actually I did quite a few. So when I run "ftp" it does nothing. Look:
Code:

nykey@nykey:~/webserver$ ftp
nykey@nykey:~/webserver$

Thanks.

MensaWater 06-17-2006 04:25 PM

Type "which ftp". This will show you where it is finding the ftp command. (You know it IS finding it because it doesn't say "ftp not found").

Once you've done that do "ls -l <path to ftp>" where path to ftp is the response you got from the which command. First thing I'd check is to make sure it isn't zero bytes.

Also look to see if it is a symbolic link to another file. Since you have other ftp utilities installed it may be it has been linked to one of those. If it is a link then do the ls -l on the file to which it is linked.

Do a "file <path to ftp>" if it's not a link to insure it is an ELF binary. If you see "text" or "ascii" it may be someone has replaced it with a script for legitimate or nefarious reasons. If it is either you can "cat <path to ftp>" to see its contents. (You can't cat a binary but can do "strings" on a binary to see if you can glean any information from its embedded text such as its version.)

acummings 06-17-2006 04:32 PM

al@AB60R:~$ which ftp
/bin/ftp
al@AB60R:~$ which lftp
/usr/bin/lftp
al@AB60R:~$ which ncftp
/usr/bin/ncftp
al@AB60R:~$ $PATH
bash: /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.:/home/al/bin: No such file or directory
al@AB60R:~$ ftp
ftp> quit
al@AB60R:~$ ls -la /bin/ftp
-rwxr-xr-x 1 root bin 66276 2006-02-02 20:45 /bin/ftp*
al@AB60R:~$

Note the file permissions on ftp binary file (must be executable or it cannot run)

What do those commands show up for you?

IOW first check those stuff (is the ftp executable still there, etc.)

If all of that stuff is intact, then I'd start looking if there might be a missing/incorrect_version/messed_up library somewhere.

Is there any security software installed that might not let a certain executable file run?

--
Alan.

nykey 06-17-2006 05:56 PM

Ok, jlightner this are the output's from your "requests"
Code:

nykey@nykey:~$ which ftp
/bin/ftp
nykey@nykey:~$ ls -l /bin/ftp
-rwxr-xr-x  1 root bin 11364 2006-06-17 19:56 /bin/ftp*
nykey@nykey:~$ file /bin/ftp
/bin/ftp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped
nykey@nykey:~$ cat /bin/ftp
▒ F4|(4 (-%-%0%00ÜX%XXÈÈ(  Qåtd/lib/ld-linux.so.2GNU"


        ▒*+g#öF¡AE¿9>µ
                      ÀEúH:Ð%¯6úºÔø    9$F[=%ÌTàK±Rß«¬±q* libc.so.6stdout__fpendinggetenvmemcpy__overflowmbrtowcmallocabortiswprintcalloc__ctype_get_mb_cur_maxfputs_unlockeddcgettextreallocmemsetfclosesetlocaleerror__ctype_b_loc__errno_locationbindtextdomain_IO_stdin_used__libc_starc¼!À¶nstCiinvfprintffreembsinit__cxa_atexit__gmon_start__GLIBC_2.3GLIBC_2.1.3GLIBC_2.1GLIBC_2.0GLIBC_2.2ii
    @DHLPTX`¶  d¶

ptx|▒ ▒¤¬°´ Uåè)èèkÉÃÿ58ÿ%<ÿ%@héàÿÿÿÿ%DéÐÿÿÿÿ%HhéÀÿÿÿÿ%Lh▒é°ÿÿÿÿ%Ph é ÿÿÿÿ%Th(éÿÿÿÿ%Xh0éÿÿÿÿ%\h8épÿÿÿÿ%`h@é`ÿÿÿÿ%dhHéPÿÿÿÿ%hhPé@ÿÿÿÿ%lhXé0ÿÿÿÿ%ph`é ÿÿÿÿ%thhéÿÿÿÿ%xhpéÿÿÿÿ%|hxéðþÿÿÿ%héàþÿÿÿ%héÐþÿÿÿ%héÀþÿÿÿ%hé°þÿÿÿ%h é þÿÿÿ%h¨éþÿÿÿ%h°éþÿÿÿ%h¸épþÿÿÿ% hÀé`þÿÿÿ%¤hÈéPþÿÿÿ%¨hÐé@þÿÿÿ%¬hØé0þÿÿÿ%°hàé  or:  %s OPTION
Exit with a status code indicating failure.

These option names may not be abbreviated.

      --help    display this help and exit
      --version  output version information and exit
bug-coreutils@gnu.org
Report bugs to <%s>.
/usr/share/localePOSIXLY_CORRECT--help--versionJim Meyering5.2.1GNU coreutilsfalsewrite error%s: %sliteralshellshell-alwayscescapeclocale"'`þ
Copyright (C) 2004 Free Software Foundation, Inc.This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
memory exhausted,àD ¢
<                  P
m
 4þÿÿoÿÿÿoðÿÿoÿ4GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3GCC: (GNU) 3.3.3.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.data.eh_frame.dynamic.ctors.dtors.jcr.got.bss.comment
                                                                                                                        ( !HÔ'
                                                                                                                              /<m7ÿÿÿoªDDþÿÿoð`S    \      `ð
 00%$TT%XX%  ((¦00&«44&ÀÀ&L µÀ&ü¼'¾nykey@nykey:~$

I've cut out a piece of the output that was not understandable and posted as much as I could the ones that could be read.
And acummings here are your results:
Code:

nykey@nykey:~$ which ftp
/bin/ftp
nykey@nykey:~$ which ftp
/bin/ftp
nykey@nykey:~$ which lftp
/usr/bin/lftp
nykey@nykey:~$ which ncftp
/usr/bin/ncftp
nykey@nykey:~$ $PATH
-bash: /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.: No such file or directory
nykey@nykey:~$ ftp
nykey@nykey:~$ ls -la /bin/ftp
-rwxr-xr-x  1 root bin 11364 2006-06-17 19:56 /bin/ftp*
nykey@nykey:~$

I have no security software wich could restrict executables.
And as for libraries... maybe .... the most recent, important and relevant installs/upgrades I've done are: upgraded gcc and gcc-g++ from slackware-current, openssl, openssl-solibs, openssh. I've played around a bit with XAMPP trying to run the Apache+SSL+PHP+proftpd bundle, didn't like it and so I installed the packages by hand. What I did mingle with is proftpd but I did create a separate group named ftpusers and added a new user to the group to try adding an account only with ftp access, no ssh and other. I followed a how-to from some page wich I can't remember now or find... Hope that's usefull and somone gives some more in depth problem searching ideeas.

nykey 06-17-2006 07:26 PM

I just wanted to say I've fixed the problem. Actually it got fixed in the update process, I had time now to download all slackware-current and made a full upgrade to -current and now ftp is working. So it seems that after I upgraded gcc, gcc-g++, openssl or openssl-solibs something went wrong or there was another package wich needed update along for ftp to continue working, but I don't know what that package could be.


All times are GMT -5. The time now is 02:28 PM.