![]() |
|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
i want deleting some security file in OpenBSD. is usage of `rm` safe and not be recovered?
|
|
|||
![]()
I believe any deleted file is still recoverable until overwritten, on any O/S, the space is just marked as available for reuse normally.
__________________
Linux since 1999, & also a BSD user. ![]() |
|
|||
![]()
@LeFrettchen: even with using -P option?
I will be very surprised!
__________________
GPG:Fingerprint ed25519 : 072A 4DA2 8AFD 868D 74CF 9EA2 B85E 9ADA C377 5E8E GPG:Fingerprint rsa4096 : 4E0D 4AF7 77F5 0FAE A35D 5B62 D0FF 7361 59BF 1733 |
|
||||
![]()
No, not when the stored sectors are replaced with other data. A 100% "undelete" can only be accomplished when 100% of the data sectors have never been overlaid, and pointers to the data are re-established.
Quote:
$ rm -P <file> writes random bytes into the data sectors of <file>.--- Both magnetic and solid state drive electronics will replace bad sectors with spare unused sectors, automatically, after any permanent read failure of the sector, if the failed sector address is written to again by an OS, such as after reformmatting and restoring a drive which has previously reported permanent read failures. Those un-addressable bad sectors remain on the drive, unreadable by any OS, for the lifetime of the drive. I suppose that a drive's Data Security Erase operation should attempt to write over these un-addressable bad sectors, but even if my supposition is correct, the permanent failure mode may not overwrite and leave prior data on these sectors which may be readable in a laboratory environment: e.g., with replaced drive electronics. So physical destruction of a drive is recommended at end-of-life if a laboratory analysis attack is a possible threat vector and either a) the drive has failed in service, or b) the drive still functions and the drive electronics reports it has replaced sectors via the drive's S.M.A.R.T. report. --- Full Disk Encryption can help alleviate the post-disk-use physical threat vector discussed above, as well as data-at-rest considerations for physical loss or for theft. But it doesn't help with running systems. There one can use rm(1) with -P to overlay sectors. On OpenBSD, I'm not certain of the threat vector if -P is not used, because I'm not sure how a process that's not the superuser or a member of the operator group will be able to read unassigned sectors. Last edited by jggimi; 28th March 2020 at 04:00 PM. Reason: clarity, and added a section discussing FDE and other threat vectors |
|
||||
![]()
Yes, my supposition was correct. From Wikipedia:
Quote:
Data Security Erase is an overwrite for magnetic media, Sanitize Block Erase is an electrical "wipe" for SSD. Last edited by jggimi; 28th March 2020 at 06:00 PM. Reason: clarity, as usual |
![]() |
Tags |
rm, safely delete |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
sysinst segfaults on Alpha ("file system full") - install help | commodorejohn | NetBSD Installation and Upgrading | 2 | 22nd March 2020 07:46 AM |
Compiling message: "write failed, file system is full"? | Nureo | OpenBSD Packages and Ports | 13 | 19th July 2016 01:36 AM |
File browser / Norton commander clone "noice" | J65nko | OpenBSD Packages and Ports | 5 | 2nd March 2016 09:53 PM |
Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" | jb_daefo | Guides | 0 | 5th October 2009 09:31 PM |
mpd: "Operation not permitted" | IIMarckus | OpenBSD Packages and Ports | 4 | 29th October 2008 08:10 AM |