Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Q: Security Attributes on Files

Q: Security Attributes on Files

Scheduled Pinned Locked Moved C / C++ / MFC
comsecurityregextutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mark Terrano
    wrote on last edited by
    #1
    1. 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)
    T 1 Reply Last reply
    0
    • M Mark Terrano
      1. 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)
      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups