I need to change the permissions of a directory to be owned by the Everyone user with all access rights on this directory. I'm a bit new to the Win32 API, so I'm somewhat lost in the SetSecurity* functions.
+1
A:
Ok, I figured it out:
SetSecurityInfo(hDir, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL);
This will give all permissions to all users for the given directory handle.
Jason
2008-10-17 20:25:41
A:
Are you sure this is a good idea? I spend a lot of time removing public access (especially public write access) from files and directories on Unix systems, in part because allowing anyone to remove or add files to a directory is an open invitation to abuse.
Jonathan Leffler
2008-10-17 21:11:29