-
Setting permissions on directories
I have tried to set permissions on a directory in Windows NT 4 using the standard
Access Control APIs - the source code is below - unfortunately it only adds
Special Directory Access, and not Special File Access to the directory.
Does anyone know where I'm going wrong.
------------------------------------------
PACL dacl = NULL;
EXPLICIT_ACCESS * expAccess = new EXPLICIT_ACCESS[2];
BuildExplicitAccessWithName(&expAccess[0], "olaves\\Luke",
GENERIC_ALL, SET_ACCESS, CONTAINER_INHERIT_ACE);
BuildExplicitAccessWithName(&expAccess[1], "olaves\\Luke", GENERIC_ALL, SET_ACCESS,
INHERIT_ONLY_ACE | OBJECT_INHERIT_ACE);
SetEntriesInAcl(2, expAccess, NULL, &dacl);
SetNamedSecurityInfo("z:\\something", SE_FILE_OBJECT, (SECURITY_INFORMATION)
(DACL_SECURITY_INFORMATION), NULL, NULL, dacl, NULL);
-----------------------------------------
Many thanks in anticipation of reply,
Luke Alexander
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks