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#
  4. assigning ownership of files and folders???

assigning ownership of files and folders???

Scheduled Pinned Locked Moved C#
csharpquestionc++securitytutorial
1 Posts 1 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.
  • L Offline
    L Offline
    lane0p2
    wrote on last edited by
    #1

    Hi All, does anyone know how to assign ownership of files and folders? i have the code to take ownership myself, but can't figure out how to assign ownership to someone else - but i can in the GUI(Vista)!! There are other 3rd party apps which can do it (setowner.exe) but i wanted to build my own so i can have extra functionality. i have found this article: "One of the security constraints of NTFS/NT is that you are only allowed to set the owner of a file to yourself (e.g. "take ownership") or to the "Administrators" group. However, there is a "side entrance" whereby you can assign any arbitrary user as the owner, even if they're not an administrator. This is a privilege that is *granted* to administrators and backup operators, but NOT *enabled* by default. So, how do you enable this? Unfortunately there is no native .NET way to do this" so my question is, does someone know how to make C# do this? Many Thanks, Phil

    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