LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save Data to a file that cannot be accessed by others.

Solved!
Go to solution

Hi,

 

I want to save some data to a file. It can be .csv or .txt or .dat. But i want to make it that I can only write to that file. Read options are given to all users. Writing and reading is both through LabVIEW. I write the data to a file through a VI and read the data from file using another VI. I have already did it and I write the data into .csv file. But then my boss said only the developer should be able to write to that file. So how do I do this. Thank You. 

0 Kudos
Message 1 of 4
(1,849 Views)

@govindsankar wrote:

I want to save some data to a file. It can be .csv or .txt or .dat. But i want to make it that I can only write to that file. Read options are given to all users. 


Hmmm... I think that is going to involve setting the Windows file permissions for that file so it can only be changed or deleted by the owner.

 


@govindsankar wrote:

But then my boss said only the developer should be able to write to that file. So how do I do this. Thank You. 


Seems kind of silly, but maybe I don't understand what this file does and why only the developer should have access to it. You know it's not hard to copy a file and open it on another machine  and take "ownership", bypassing any security you thought you had by restricting write access. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 4
(1,840 Views)

What the file has is all permissible labelling for PCBs. We have a testing system for PCBs and when we test we need to enter the type of PCB for eg : SAR41-c_1A1. But say someone enters SAR47-e_10 which is not an actual type. So what I did is create a CSV file that had all the various possibilities for the PCB and when someone enters the PCB type the software reads all the values in the CSV file and checks with the value that person has entered and if it is one of the values in the CSV file then it is ok otherwise an error will appear. But in future when in new PCB label comes, we need to enter this value into that CSV. But only the developer should be able to do it. That is what I want. I have uploaded the saving into .csv file program. Its just a simple program that saves data entered into the .csv file.

0 Kudos
Message 3 of 4
(1,825 Views)
Solution
Accepted by topic author govindsankar

If that's all you are worried about as long as you are restricting users to their own user accounts the basic Windows file permissions should be enough.

 

But consider saving the file in a binary format so it is not "Human readable" and write a separate program to update this file. 

 

Honestly having to call the developer just to enter the new number every time production has a new model is a waste of resources. A production manager should be able to update this file.

========================
=== Engineer Ambiguously ===
========================
Message 4 of 4
(1,818 Views)