LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we Protect & lock a folder using labview?

Hi all

 

First of all i am a beginner. My data is stored in a particular folder and i don't want the user to find it out and open the content.. This content of folder will be used frequently by application (read & write). Please help me...

 

Thanks & Regards

 

Rajesh R. Nair

Rajesh Raghavan Nair

Certified LabVIEW Architect
Certified Teststand Architect
0 Kudos
Message 1 of 10
(5,261 Views)

This is more of an Operating System feature. Which OS are you using?

There is a Set Permissions function available under the Advanced File Functions which may do the trick.

But if the user has Admin privileges, they could change the permissions and then do the changes to the files. It depends how well they know how to hack within a given OS.

 

This is what the function looks like:

 

 

Now, if you wanted them to see gibberish when opening the file and thus preventing them to know how to modify it or what to modify, then that might be the way to go.

I think I accomplished that once by doing something as simple as saving a cluster of data as a binary file.  It can be easily restored by doing the steps in reverse. 

 

 

Message 2 of 10
(5,251 Views)

The first step would be to store the data in the appropriate folder: application data

ApplicationData.png

 

This folder is normally stored in the users profile and specifically created for such uses.

 

It is advisable to create a special sub-folder for you application.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 10
(5,236 Views)

Hi Ton,

 

What I meant by:


@Ray.R wrote:

But if the user has Admin privileges, they could change the permissions and then do the changes to the files. It depends how well they know how to hack within a given OS.


Is that if someone has Adminitrator privileges, then they could still access the files and modify them.

It depends on the situation and which OS is being used, although unlikely to be Win-95/98 or Win-NT.

 

If the Operator needs to log in to run the application which saves to the Application Data folder, then they would need access to that folder, which means it's either within their own folder (thus they can access/modify the file) or it is in another folder to which they have permission to write to.  In either case, if the Operator runs the application and as a result of running the application a file is created to store data, then they would have access to that file.

 

One trick would be to save it in a complicated deep folder somewhere or on a network drive which allows to save a file once, but not allow to edit it (that's what they have here).  It may be possible to do the same arrangement on a PC with permissions.  Again that's an OS specific feature.

 

R

0 Kudos
Message 4 of 10
(5,217 Views)

Ton's advice is a good start.  That will place your programs application data in the standard spot that all other applications should be using.  This location (I think) is a hidden folder by default (at least on the Windows OS).  If the user feels like being a little hacker and mess with the files in the folder, then they are bringing application errors upon themselves.

 

If you are worried about senstive information, then you might want to consider encrypting the contents of the folder.

0 Kudos
Message 5 of 10
(5,206 Views)

I should clarify...

 

Ton's advice was good.  My intention was not to put it down.

In a normal environment, that's fine.

 

I have seen in my career some (insert politically correct word for idiot) that would work on the night shift.

Instead of doing work, he would try to hack the data files to fake the test results so that he could go sleep instead of test (caught on camera).

 

The amusing side of this story is that management supported him and commended him on his brilliant skills at hacking.

 

Euh... I did mention to the management of the time that he got caught right away..  I did have safeguards in place to validate the authenticity of the data files..

 

You meet all kinds.

 

Other amusing part of the story.

 

 

The same guy in question had no programming experience.  He actually managed to get a job as a LabVIEW programmer after claiming that he wrote the software..  He was hired as a test operator and "stole" the source code..

 

That's the type of guy you need to protect your datafiles from.... 😄

 

Need a name 😉  LOL!

 

 

0 Kudos
Message 6 of 10
(5,190 Views)

Thank You Ray. I will try with set permission function. The OS using is windows XP.

 

Thank You Ton . I am using LabVIEW 8.6. Is this application data function available in 8.6?? As mentioned by Ray if the user have admin privilege he can surely edit it. We are now facing problem in which the operator will try to edit these logged files....we tried to protect it by changing extension but they found that also..

 

Thanks to Nickerbocker .. i am also considering the encryption

 

Regards

 

Rajesh R

 

 

Rajesh Raghavan Nair

Certified LabVIEW Architect
Certified Teststand Architect
0 Kudos
Message 7 of 10
(5,169 Views)

 


@rajesh Nair wrote:

 

 

Thank You Ton . I am using LabVIEW 8.6. Is this application data function available in 8.6??

 

 


 

No, I think these are 2009 and up only.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 8 of 10
(5,157 Views)

Hi this new for me How to protect folder lock using single user with one examples.please help me

0 Kudos
Message 9 of 10
(4,574 Views)

@prakash90 wrote:

Hi this new for me How to protect folder lock using single user with one examples.please help me


How does the current thread not answer your question?

 

If your question differs from the original thread, make a new thread asking your new question.

0 Kudos
Message 10 of 10
(4,549 Views)