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. setting directory permissions

setting directory permissions

Scheduled Pinned Locked Moved C#
helpcsharpquestion
3 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.
  • G Offline
    G Offline
    Gavin Jeffrey
    wrote on last edited by
    #1

    Hi, I have a c# console app that periodically look at one directory to see if any new folders have been uploaded there. If it finds a new folder it should move this folder to a different folder. This works fine my problem is that it moves this folder with the old permissions. Is there any way that I can change the owner of this folder to be set to its new parent folder? I have had a look at activeDs but I just can't seem to delete the existing permissions I can however add new permissions. Any help would be greatly appreciated. Thanks in advance. Gavin Jeffrey

    H 1 Reply Last reply
    0
    • G Gavin Jeffrey

      Hi, I have a c# console app that periodically look at one directory to see if any new folders have been uploaded there. If it finds a new folder it should move this folder to a different folder. This works fine my problem is that it moves this folder with the old permissions. Is there any way that I can change the owner of this folder to be set to its new parent folder? I have had a look at activeDs but I just can't seem to delete the existing permissions I can however add new permissions. Any help would be greatly appreciated. Thanks in advance. Gavin Jeffrey

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      See http://weblogs.asp.net/cumpsd/archive/2004/02/08/69403.aspx[^] and follow the link to the GotDotNet sample, which is written by Microsoft and will be included (in some form) in the upcoming .NET 2.0 release. Also keep in mind that you must have (or rather, your application) the right permissions to make changes you requested, otherwise what would be the point of file security?

      Microsoft MVP, Visual C# My Articles

      G 1 Reply Last reply
      0
      • H Heath Stewart

        See http://weblogs.asp.net/cumpsd/archive/2004/02/08/69403.aspx[^] and follow the link to the GotDotNet sample, which is written by Microsoft and will be included (in some form) in the upcoming .NET 2.0 release. Also keep in mind that you must have (or rather, your application) the right permissions to make changes you requested, otherwise what would be the point of file security?

        Microsoft MVP, Visual C# My Articles

        G Offline
        G Offline
        Gavin Jeffrey
        wrote on last edited by
        #3

        great it works. Thanks for the help.

        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