0

its maybe a really dummie question but I was wondering is there any way to create a file (like txt) that the program can use its data but the users can't access it ? sql is an option but the data aren't large enough to be used. is there any other file type or way to do this?

4
Contributors
3
Replies
16
Views
3 Years
Discussion Span
Last Post by deceptikon
0

You can use a text file as a datasource (flat files). But you cannot keep the user from accesing it. You can, however encrypt the data so that they cannot interpret the data it contains. You can also give the file an odd extension so that the user does not know what the file is for. e.g.g MyData.trr

Edited by Maligui

0

In Unix/Linux and similar systems, you can set the file's attributes so that ONLY the owner or administrator (root) can access the file. As for program access only, then the only means is to encrypt the file, and allow the user to specify the password on the command line. Combined with file attributes, this would keep anyone but the owner who knows the password from accessing the file and its contents.

Anyway, since this is in the C# forum, I have to assume it is a Windows system, most likely. In that case, you really need to encrypt the file and keep the password secret.

Edited by rubberman

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.