Re: Setting File and Folder Permissions

From: Ivan Medvedev [MS] (ivanmed_at_online.microsoft.com)
Date: 04/29/03


Date: Tue, 29 Apr 2003 08:42:22 -0700


Pete -
it sounds like you are talking about assigning ACLs to file/folder objects.
Unfortunately in the current version this functionality is not supported. I
have however heard of samples available on the net that do it by calling
directly into Win32 API using DllImport. The FileIOPermission class is a
part of Code Access Security, which is based on assigning permissions to
code rather than resources.
Hope this helps.
--Ivan

This posting is provided "AS IS" with no warranties, and confers no rights.

"Pete Appleby" <boneoh@yahoo.com> wrote in message
news:05af01c30dae$78855360$a001280a@phx.gbl...
> I have a VB dot net program that I use to create a set of
> folders and files on the server each time our users begin
> a new project. This sets up naming conventions,
> templates, etc. I run this program as the system
> administrator.
>
> How can I use dot net classes to assign the appropriate
> file and folder permissions to my NT domain group names
> and user names? I would like to remove or deny some of
> the default groups and users, then add some new ones as
> appropriate.
>
> Seems that this should be easy, since I can create files
> and folders using System.IO classes.
>
> System.Security provides FILEIOPERMISSIONS, but that
> seems to lock you into the context of the current user,
> not for other Domain groups and users.
>
> I've been searching like crazy with no luck.
>
> TIA!