Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
2.50/5 (4 votes)
See more:
Hello There,

I want to set attribute to directory so that - This (Required) directory can not copy, send to, Move to any other location.

Purpose : We can prevent making copy of secure data.

Please suggest/Help.
Posted
Comments
Dean Oliver 27-Feb-12 11:04am    
Why not rather encrypt the data.
johannesnestler 27-Feb-12 11:33am    
Impossible, bad requirenment - go for encryption on sensible data (so that a copy is useless).
Sergey Alexandrovich Kryukov 27-Feb-12 17:31pm    
Exactly. Dave correctly answered.
--SA
Philippe Mori 27-Feb-12 19:01pm    
Don't give access to that data at all.

1 solution

You can't prevent a user from copying or moving the data. Why??

Because code always runs AS the user who launched it. It inherits the users security token and all of his/her permissions.

Now, a file copy operation is nothing more than open a file, read the bytes in it, then close the file. Does that sound anything like what your application does?? It should.

If the user is unable to open and read the file for copy, your application won't be able to read the file either.


The ONLY method you have of securing the data is to encrypt it with a reversible encryption scheme.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 27-Feb-12 17:31pm    
Agree, reasonable correct arguments. My 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900