setting file permissions

I am looking for code which can set ntfs file-security on a file.

The application will work as follows,
- user requests a file
- an appserver which is running under a admin-account copies the file from a secure-folder to a shared folder.
- the appserver grants the user rights to the file, so he can access/delete it.

So how to grant the permission to the copied file?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jurjen's picture

setting file permissions

I can only assume that it involves the SetNamedSecurityInfo function in advapi32.dll. I don't have example code for it, a C++ example is here: here but it looks difficult to port to ABL. Perhaps just wrap it into a DLL of your own?