Why not first go and read some blog posts and already written solutions for this?
First of all, go and read the
Access Control[
^] by Microsoft. Secondly, you can learn the FileIOPermission class from the
MSDN[
^]. They will provide you with minimal (but probably maximum) information related to your project.
The second link (MSDN link) has the detailed information for the permissions that you can set to the File using that code.