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. security

security

Scheduled Pinned Locked Moved C#
security
3 Posts 3 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
    mohammadQ
    wrote on last edited by
    #1

    FileIOPermissins this class give me permissions on my application but not change permissions Physically on my drive i need to change the permissions on any folder on my drive Physically even if i close the application

    D V 2 Replies Last reply
    0
    • M mohammadQ

      FileIOPermissins this class give me permissions on my application but not change permissions Physically on my drive i need to change the permissions on any folder on my drive Physically even if i close the application

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      There is nothing native in the .NET Framework to modify the Access Control Lists on Files, as far as I can find. You would have to use calls into the API to accomplish this. It would require writing up a couple dozen structure and function headers: LookupAccountName, InitializeSecurityDescriptor, GetSecurityDescriptorDacl, GetFileSecurityN, GetFileSecurity, GetAclInformation, EqualSid, GetLengthSid, InitializeAcl, GetAce, AddAce, AddAccessAllowedAce, AddAccessDeniedAce, SetSecurityDescriptorDacl, SetFileSecurity, ... then there's the structures that go along with them: SECURITY_DESCRIPTOR, ACL_SIZE_INFORMATION, ACL, ACCESS_ALLOWED_ACE, ACCESS_DENIED_ACE, ACE_HEADER RageInTheMachine9532

      1 Reply Last reply
      0
      • M mohammadQ

        FileIOPermissins this class give me permissions on my application but not change permissions Physically on my drive i need to change the permissions on any folder on my drive Physically even if i close the application

        V Offline
        V Offline
        Verdant123
        wrote on last edited by
        #3

        try this!

        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