Re: DACL Strings

From: Garfield Lewis (galewis_at_SPAM-NO-MOREca.ibm.com)
Date: 12/28/04


Date: Mon, 27 Dec 2004 20:21:48 -0500

Hi,

I don't believel this security attribute has been properly initialized. You
will need to also to the following:

sa.nLength=sizeof(SECURITY_ATTRIBYTES);
sa.bInheritHandle=TRUE; // or FALSE

otherwise, you don't know what you are actually passing to CreateDirectory
in these structure members.

-- 
Garfield A. Lewis
DB2 UDB Development,
IBM Canada Laboratory
"Niptomomys" <Niptomomys@discussions.microsoft.com> wrote in message
news:BF8236B4-E303-4C7A-8C53-2A85D57E4609@microsoft.com...
> As part of an installation, I need to programatically create a folder
> C:\foldername and set permissions so that any non-priveleged user has
> RW access. For legacy reasons the folder must be at the root and not
> in All Users\Shared Documents. Via SDK references I found that using:
>
> SECURITY_ATTRIBUTES sa;
> char *pwszSD = "D:(A;OICI;GA;;;BA)";
> ConvertStringSecurityDescriptorToSecurityDescriptor(
>    pwszSD,
>    SDDL_REVISION_1,
>    &(sa.lpSecurityDescriptor),
>    NULL);
> CreateDirectory(pathname,&sa);
>
> Works as needed on Win2000, but not on XP. Can you suggest a
> string that will set permissions for all users?
>


Relevant Pages

  • Re: Yet another permissions thing
    ... You are mixing two technologies here - .NET and COM, however, this has some security implications. ... > folder on another server, ... > I have the ASP.NET app impersonating an account with permissions to create ... > user in question to set permissions on the folder. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Restrict Access to folders on non-networked machine.
    ... NTFS Security, but keep in mind that this is going to be "light" security ... What you're going to do is, basically, set permissions on a couple of ... local folders such that user A has no access to folder B, ...
    (comp.os.ms-windows.nt.admin.security)
  • Re: setting permissions for files and folders
    ... > properties> security. ... if you have WinXP Home Edition then you do not have access to the ACL ... ACL for a folder or file. ...
    (microsoft.public.windowsxp.security_admin)
  • Setting Permissions on XP Home
    ... How do I set Permissions on my computer running Windows XP Home Edition? ... Everything I have read says to right-click on the folder, select Properties, ... I don't see a tab called Security. ... see is a Sharing tab and it doesn't have a button on it to set Permissions. ...
    (microsoft.public.windowsxp.security_admin)
  • DACL Strings
    ... I need to programatically create a folder ... C:\foldername and set permissions so that any non-priveleged user has ... For legacy reasons the folder must be at the root and not ...
    (microsoft.public.platformsdk.security)