Q: Security Attributes on Files
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
- I'm using CopyFile, which does what I need, but it does not copy the security attributes of the file (owner information particularly). I've rooted around in the documentation, but cannot seem to find how I can set the file security attributes of the copied file to match source file. 2) Also, I'd like to know how to set a file to 'my' owner name when I've copied it to a local machine. (Hopefully Q:1 will answer Q:2) I'm hoping there is something easy and obvious I've overlooked. If you can point me to the right name I'd appreciate it. Thanks in advance!:-O --Mark Terrano www.ensemblestudios.com (Creators of the Age of Empires series)
-
- I'm using CopyFile, which does what I need, but it does not copy the security attributes of the file (owner information particularly). I've rooted around in the documentation, but cannot seem to find how I can set the file security attributes of the copied file to match source file. 2) Also, I'd like to know how to set a file to 'my' owner name when I've copied it to a local machine. (Hopefully Q:1 will answer Q:2) I'm hoping there is something easy and obvious I've overlooked. If you can point me to the right name I'd appreciate it. Thanks in advance!:-O --Mark Terrano www.ensemblestudios.com (Creators of the Age of Empires series)
I believe SHFileOperation copies security attributes, unless you specify FOF_NOCOPYSECURITYATTRIBS flag. If you don't want a progress dialog, use FOF_SILENT. Tomasz Sowinski -- http://www.shooltz.com