Restricting access to a file
-
My application stores its settings in an XML file on user's PC. But the data inside the xml file can be easily read and changed by anyone who can see that file. I want to lock that file so that no one can open that file except my application. Is there any way to achieve this without encrypting/decrypting whatever I dump into file?
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..
-
My application stores its settings in an XML file on user's PC. But the data inside the xml file can be easily read and changed by anyone who can see that file. I want to lock that file so that no one can open that file except my application. Is there any way to achieve this without encrypting/decrypting whatever I dump into file?
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..
Locking alone will not do the job. If a file is on my system then I can view it. Period. Your best best is encryption in such a case. Saurabh
-
My application stores its settings in an XML file on user's PC. But the data inside the xml file can be easily read and changed by anyone who can see that file. I want to lock that file so that no one can open that file except my application. Is there any way to achieve this without encrypting/decrypting whatever I dump into file?
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..
Can you add an ACE to the file's ACL?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Can you add an ACE to the file's ACL?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Suppose, I add write restriciton for the user but won't that restrict my application too from writing to that file? I am yet to look into this.
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..
-
Suppose, I add write restriciton for the user but won't that restrict my application too from writing to that file? I am yet to look into this.
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..
If access to your file was limited to a certain user, then you could run your program as that user. I've not done this before so it may or may not work for your situation.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne