Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-19 Thread Sunnz
2008/1/19, bofh [EMAIL PROTECTED]: On Jan 18, 2008 4:28 PM, Ted Unangst [EMAIL PROTECTED] wrote: On 1/18/08, Sunnz [EMAIL PROTECTED] wrote: From what I understand, if foo isn't the last hard link to the file, and `rm foo` will NOT delete the file... what does it matter if somebody

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-19 Thread Ted Unangst
On 1/18/08, bofh [EMAIL PROTECTED] wrote: I think he means sshd. And it really doesn't matter, once you make install, you'll overwrite the vulnerable copy with the new one, and all the hardlinks won't matter, because they'd be linked to the new file. except that they won't. the point of a

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-19 Thread Otto Moerbeek
On Sat, Jan 19, 2008 at 10:27:25AM -0800, Ted Unangst wrote: On 1/18/08, bofh [EMAIL PROTECTED] wrote: I think he means sshd. And it really doesn't matter, once you make install, you'll overwrite the vulnerable copy with the new one, and all the hardlinks won't matter, because they'd be

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-19 Thread Paul de Weerd
On Sat, Jan 19, 2008 at 08:57:10PM +0100, Otto Moerbeek wrote: | On Sat, Jan 19, 2008 at 10:27:25AM -0800, Ted Unangst wrote: | | On 1/18/08, bofh [EMAIL PROTECTED] wrote: | I think he means sshd. And it really doesn't matter, once you make install, | you'll overwrite the vulnerable copy

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-19 Thread Otto Moerbeek
On Sat, Jan 19, 2008 at 09:06:30PM +0100, Paul de Weerd wrote: On Sat, Jan 19, 2008 at 08:57:10PM +0100, Otto Moerbeek wrote: | On Sat, Jan 19, 2008 at 10:27:25AM -0800, Ted Unangst wrote: | | On 1/18/08, bofh [EMAIL PROTECTED] wrote: | I think he means sshd. And it really doesn't

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-19 Thread bofh
On Jan 19, 2008 1:27 PM, Ted Unangst [EMAIL PROTECTED] wrote: On 1/18/08, bofh [EMAIL PROTECTED] wrote: I think he means sshd. And it really doesn't matter, once you make install, you'll overwrite the vulnerable copy with the new one, and all the hardlinks won't matter, because they'd

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-19 Thread Stuart Henderson
On 2008/01/19 19:46, bofh wrote: On Jan 19, 2008 1:27 PM, Ted Unangst [EMAIL PROTECTED] wrote: On 1/18/08, bofh [EMAIL PROTECTED] wrote: I think he means sshd. And it really doesn't matter, once you make install, you'll overwrite the vulnerable copy with the new one, and all the

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-19 Thread NetOne - Doichin Dokov
bofh P=P0P?P8QP0: On Jan 19, 2008 1:27 PM, Ted Unangst [EMAIL PROTECTED] wrote: On 1/18/08, bofh [EMAIL PROTECTED] wrote: I think he means sshd. And it really doesn't matter, once you make install, you'll overwrite the vulnerable copy with the new one, and all the

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-19 Thread Tony Abernethy
bofh wrote: I don't get what you're talking about. If you overwrite the file (vulnerable sshd) with a new one, the file gets replaced. All the hardlinks would point to the new file. Copying to a file can be done in two distinct ways with different results for any other hard links to same

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-19 Thread bofh
On Jan 19, 2008 8:22 PM, Tony Abernethy [EMAIL PROTECTED] wrote: Copying to a file can be done in two distinct ways with different results for any other hard links to same file. cp overwrites the original inode install unlinks the original inode (after?) writing a new inode You probably get

So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-18 Thread Sunnz
2007/12/30, Hannah Schroeter [EMAIL PROTECTED]: If you type rm foo and foo was the last link to the file (the underlying inode) and there was no open file descriptor and no mapped memory referring to the inode, either (I hope I've covered the important kinds So, is there a 'sure way' to

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-18 Thread Otto Moerbeek
On Sat, Jan 19, 2008 at 03:08:36AM +1100, Sunnz wrote: 2007/12/30, Hannah Schroeter [EMAIL PROTECTED]: If you type rm foo and foo was the last link to the file (the underlying inode) and there was no open file descriptor and no mapped memory referring to the inode, either (I hope I've

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-18 Thread Ted Unangst
On 1/18/08, Sunnz [EMAIL PROTECTED] wrote: From what I understand, if foo isn't the last hard link to the file, and `rm foo` will NOT delete the file... Say if the current version of OpenSSH has a security hole, and some user create a hard link to it, it would be the that version of OpenSSH

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-18 Thread bofh
On Jan 18, 2008 4:28 PM, Ted Unangst [EMAIL PROTECTED] wrote: On 1/18/08, Sunnz [EMAIL PROTECTED] wrote: From what I understand, if foo isn't the last hard link to the file, and `rm foo` will NOT delete the file... what does it matter if somebody keeps a link to it? if you have idiot

Re: So, is there a sure way to delete a file? (Was Re: UNIX way of undeleting files?)

2008-01-18 Thread Sunnz
2008/1/19, Ted Unangst [EMAIL PROTECTED]: what does it matter if somebody keeps a link to it? if you have idiot users who insist on using broken software, you have bigger problems. what if they download the old version and compile it themselves? I guess you are right... but still, that would

Re: UNIX way of undeleting files?

2007-12-29 Thread Antti Harri
Restoring from backups. -- Antti Harri

Re: UNIX way of undeleting files?

2007-12-29 Thread Markus Hennecke
Girish Venkatachalam schrieb: Just wondering if there was a way to undelete a file. Get it from your backup. No backup? Then it is gone. Best regards, Markus

UNIX way of undeleting files?

2007-12-29 Thread Girish Venkatachalam
Just wondering if there was a way to undelete a file. I have never run into the situation so far (surprise, surprise) but I sure will in future. It is best to know. I saw something like this. $ grep -a -B[size before] -A[size after] 'text' /dev/[your_partition] I want something from the old

Re: UNIX way of undeleting files?

2007-12-29 Thread Chris Kuethe
On Dec 29, 2007 9:56 AM, Girish Venkatachalam [EMAIL PROTECTED] wrote: Just wondering if there was a way to undelete a file. I have never run into the situation so far (surprise, surprise) but I sure will in future. dd, a hex editor and a love of jigsaw puzzles? maybe sysutils/sleuthkit? CK

Re: UNIX way of undeleting files?

2007-12-29 Thread Unix Fan
From my understanding, restoring a file after deletion would be very complicated because files aren't stored in a sequential fashion... When you delete a file, the inode for the file is removed.. (assuming there wasn't another hard link to it...)... That inode contained the only list of

Re: UNIX way of undeleting files?

2007-12-29 Thread baldoni
Now, I'm sure I'm interpreting the word remove improperly here. But not to put too fine a point on it, the inode is removed? Is it that link between the inod number and the file that is removed? In this arena I am truly ignorant, but nonetheless not blissed. Gian

Re: UNIX way of undeleting files?

2007-12-29 Thread Hannah Schroeter
Hi! On Sat, Dec 29, 2007 at 07:16:11PM -0500, [EMAIL PROTECTED] wrote: Now, I'm sure I'm interpreting the word remove improperly here. But not to put too fine a point on it, the inode is removed? Is it that link between the inod number and the file that is removed? In this arena I am truly

Re: UNIX way of undeleting files?

2007-12-29 Thread Girish Venkatachalam
On 12:32:58 Dec 29, Unix Fan wrote: From my understanding, restoring a file after deletion would be very complicated because files aren't stored in a sequential fashion... When you delete a file, the inode for the file is removed.. (assuming there wasn't another hard link to it...)...

Re: UNIX way of undeleting files?

2007-12-29 Thread Girish Venkatachalam
On 02:34:15 Dec 30, Hannah Schroeter wrote: If you type rm foo and foo was the last link to the file (the underlying inode) and there was no open file descriptor and no mapped memory referring to the inode, either (I hope I've covered the important kinds of references to inodes), the inode

Re: UNIX way of undeleting files?

2007-12-29 Thread Antti Harri
On Sun, 30 Dec 2007, Girish Venkatachalam wrote: It is clear that it is impossible to undelete an FFS file. It isn't impossible, it's just not worth the effort because once the references to the data have been removed it's highly likely they will be allocated for another file again. Just