02-04-2009 01:03 PM
Christian Hahn
National Instruments
02-05-2009 02:16 AM
C. Hahn wrote:
I recently became aware that there is really no way to prevent a file from being deleted from an OS. This is true of Windows/Mac/Linux and even RT. To make matters worse, file and folder access restrictions are not enforced on RT targets. So, has anyone come up with a clever way of preserving a file that you don't want deleted? Perhaps by mirroring the files and doing a periodic checksum to verify that one hasn't been deleted or modified or something like that?
Christian Hahn
National Instruments
Not sure about RT but on a desktop OS opening the file with share deny at least write or all, you should not be able to delete that file from any other process.
Also setting the permissions of a file to be of a specifc owner under whose credentials your app would need to run to be able to modify it of course should prevent anyone to see or delete the file except the administrator and that user. If you run as administrator by default (BAD! BAD!) then of course all OS imposed security is gone. And I do think that RT systems might not actually implement user accounts and security though.
If this needs to be persistent even when your application doesn't run then yes I would suppose your approach is the best.
Rolf Kalbermatter
Rolf Kalbermatter
02-05-2009 02:43 AM
If you have a dedicated RT system the only way to directly access files is ftp. So just lock the system.
If on top of that you want to disable LabVIEW access (VI server) you can restrict access or disable it.
Daniel