Re: Missing bin directory

From: Andy Baxter (news2_at_earthsong.null.free-online.co.uk)
Date: 09/11/03


Date: Thu, 11 Sep 2003 11:11:36 +0100

Dan Grabbybear wrote:

> The /bin directory was deleted by accident on a server with only telnet
> access, and I'm wondering how I can get back some basic commands such as
> cp
> and mkdir. I have ftp access. Would it be possible to ftp an equivalent
> binary? Is it possible recreate the bin directory without mkdir or a cd?
> Thanks.

I'm assuming that you still have /usr/bin? Try using the built-in copy
function from midnight commander or a similar utility. This almost
certainly works using the standard unix functions not the cp command from
/bin, so as long as you still have /lib (most likely /lib/libc.so.6), it
might work.
Or you could run sshd on the server and use scp?
Also, the commands don't need to be in /bin in order to run - this is just
for convenience so they can be found through $PATH. So you could ftp a
suitable version of cp+mkdir to your usual ftp directory, then run them
from there using './cd' .

andy.

-- 
remove ' n - u - l - l ' to email me.
Please don't send me html mail or un-notified attachments. These will be
automatically filed under 'probable spam' unless I'm expecting an email
which hasn't come.
If you do need to send an attachment or html mail, put [attachment] or
[html] in the subject line.
Thanks, andy.


Relevant Pages

  • Re: Mime type?
    ... options for not sending these commands. ... >>I was into the Fetch FTP web site and this is what I found - it looks ... >> My server does not recognize them. ...
    (microsoft.public.inetserver.iis)
  • Re: Missing bin directory
    ... and I'm wondering how I can get back some basic commands such as ... I have ftp access. ... or from another identical system. ... Let's take a look on my box what packages are in bin: ...
    (comp.os.linux.misc)
  • Re: Anyone know how to complete this script?
    ... Then you can set an envionmental variable such as "DAT" and call it in a script ... Then you can create a text file (FTP-CMD.TXT) of commands that can then be used by using FTP ...
    (microsoft.public.win2000.general)
  • Re: Script that checks for existence of file on remote server.
    ... that the file was FTP'd over onto the REMOTE system, ... If you are administrator of both systems and can do remote shell ... commands, you can simply set up so that you can issue "rsh" commands. ... If you must use FTP to do this, you can always capture your FTP ...
    (comp.unix.aix)
  • RE: SBS2003 Premium and ISA2004 SP3 FTP and POP3 problems
    ... Then try to access FTP. ... Test the FTP access and let me know the result. ... Disable web proxy on client computer and SBS: ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)