Folder Permissions

R

ralderton

How can you set folder permissions from an asp.net (vb.net) Web app
I want to dynamically create folder and assign full permissions to only
system and a specific user account

Thanks
 
G

Guest

You can create folders programmatically using functions from the system.io
namespace, and you can assign permissiins with the system.directoryservices
namespace.

The later is a little tricky as it is a wrapper to Win32 APIs. Be sure to
use the WinNT provider. It also involves knowing some commands which you will
not see with Intellisense. I strongly recommend you download ADSI 2.5 and
read the documentation and samples that come with it. Here is the link

http://www.microsoft.com/NTWorkstation/downloads/Other/ADSI25.asp

hope this helps,
John
 
J

Jeffrey Tan[MSFT]

Hi ralderton,

Just as John suggested, you may the classes System.IO namespace to create a
folder. Then to control the folder's permission through ADSI, in .Net
Framework, we can use System.DirectoryServices namespace to invoke the
ADSI.

ADsSecurity.DLL is the ADSI resource kit utility, it can help you to
control folder permission, for more information, please follow this KB:
"HOWTO: Use ADsSecurity.dll to Add an Access Control Entry to an NTFS
Folder"
http://support.microsoft.com/default.aspx?id=279682

You may also get much useful information about ADSI control NTFS permission
through:
http://www.serverwatch.com/tutorials/article.php/1476721
http://www.serverwatch.com/tutorials/article.php/1476741
http://www.serverwatch.com/tutorials/article.php/1476751

==============================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top