vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I deleted /usr/bin by accident.. long story. I have ftp access and a similar machine with root permissions. I ftp (mput) all the bin files over. I can see this in ls using native ftp. However, I am unable to exec any of the commands including ls and chmod. I cannot rlogin either. I would like to restore bin without compromising data if at all possible. I am in the middle of ftping down some data files -without recursive get from the client, it is slow going. any hope? Thanks... |
| |||
| ALS schrieb: > I deleted /usr/bin by accident.. long story. I have ftp access and a similar > machine with root permissions. I ftp (mput) all the bin files over. I can > see this in ls using native ftp. However, I am unable to exec any of the > commands including ls and chmod. IIRC one can chmod through the ftp connection via the site umask ... subcommand. |
| |||
| FTP won't help - it does not retain file attributes. This is especially important for SUID files, like "su". I'd recommend tape restore, using maintenance mode after booting from AIX CD. You may also try to make a tar archive of the directory (tar vcf arch.tar /usr/bin). Then FTP it to the damaged host, and unpack with "tar vxf arch.tar". I cannot guarantee it will work, but you may give it a try if no backup is available. |
| |||
| thanks for the response. tar is unavailable. it is a bin command. I have tape backup, but was hoping for something less drastic than booting from tape. "brother_Matthius" <maciek.mazan@gmail.com> wrote in message news:1162936712.782935.88120@i42g2000cwa.googlegro ups.com... > FTP won't help - it does not retain file attributes. This is especially > important for SUID files, like "su". > > I'd recommend tape restore, using maintenance mode after booting from > AIX CD. > > You may also try to make a tar archive of the directory (tar vcf > arch.tar /usr/bin). Then FTP it to the damaged host, and unpack with > "tar vxf arch.tar". > I cannot guarantee it will work, but you may give it a try if no backup > is available. > |
| |||
| Michael, The site command chmod worked. I was able to get ls, rcp and tar back. all at 777 for now. but my server is offline. I chmod su also to 777. I am unable to authenticate to root. I also changed out passwd. I suppose i can drill down the list. unless i can get su up, I am stuck since we do not allow for root to rlogin.. (luckily for me ftp was enabled). thanks for you help.. If you know how to get su to authenticate me, I believe i will be back in business. real test is to power down and come back of course. "Michael Kraemer" <M.Kraemer@gsi.de> wrote in message news:eiqvd6$pmd$02$1@news.t-online.com... > ALS schrieb: >> I deleted /usr/bin by accident.. long story. I have ftp access and a >> similar machine with root permissions. I ftp (mput) all the bin files >> over. I can see this in ls using native ftp. However, I am unable to exec >> any of the commands including ls and chmod. > > IIRC one can chmod through the ftp connection > via the > > site umask ... > > subcommand. > > |
| |||
| FTP does has its own umask so you are normaly unable to get the x bit set for uploaded files. You might scp or rcp in case they are working. In case not i would boot from tape or cd , go for maintenance shell and set the required security settings on you file into /usr/bin . After that that reboot and just restore the /usr/bin directroy structure from your mksysb. hth Hajo |
| |||
| Thanks for all who helped. I finally got the machine back. ftp in aix is enabled with SITE CHMOD command. unfortunatlly it only works on one file. you're right, the SITE UMASK did not give me the x bit. I copied down ls, chmod, rlogin, rcp, su and other essential files. used site chmod to change permissions one by one. fumbled a bit to get su access but got it by copying over all su-related files (esp uname). once that was done.. made a tape of bin and extracted it. i had to change permissions manually for those that I had copied over.. But, the system is now back to normal.. rebooted and everything. hopefully, no one else has to do this.. (my problems started out with inheriting a bad installation, with nested levels and levels of bin in the user's home directory with bad permissions and .profile pointing to thse files..maybe due to extracting a bootable? - whcih i tried to clean out, ended up wiping it out) thanks again.. "ALS" <alsrini@hotmail.com> wrote in message news:j174h.1287$Bk5.618@trnddc06... >I deleted /usr/bin by accident.. long story. I have ftp access and a >similar machine with root permissions. I ftp (mput) all the bin files over. >I can see this in ls using native ftp. However, I am unable to exec any of >the commands including ls and chmod. > > I cannot rlogin either. I would like to restore bin without compromising > data if at all possible. I am in the middle of ftping down some data > files -without recursive get from the client, it is slow going. > > any hope? > > Thanks... > |
| ||||
| Glad to hear you've gotten it resolved. Just a quick thought - - My team lead had a similiar problem 3 years ago - and he also solved it by grabbing the /usr/bin from a similiar box and transplanting it. The system ran - but we saw lots of odd errors and sometimes unpredictable behavior (crashes etc) until we did a full restore |