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. Windows Forms
  4. Folder Permissions - Urgent Help Please

Folder Permissions - Urgent Help Please

Scheduled Pinned Locked Moved Windows Forms
helpcsharpsysadminquestion
3 Posts 3 Posters 10 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.
  • S Offline
    S Offline
    Seuss
    wrote on last edited by
    #1

    Hi I am in need of help please as I am not familiar with the folder permissions stuff. Everyone has access to a particular folder where the files are held. Q1. The folder permissons have 'EVERYONE' set to tick on everything Full control Modify Read & Execute List Folder contents Read There is also [company name]/Administrators - they have the same settings as above. There is another group for everyone [CompanyName]/[CompanyName] How can we prevent access to this folder for everyone? The problem is in the VB.Net application, there are some forms that creates a file in that folder and 'everyone' who logs into this application are allowed to generate a file that is written to this folder BUT we don't want them having access to the folder to see all the files. The software (VB.Net) actually generates files by a logged in user but they shouldn't be able to access the folder when they go to the My Computer->Network->Folder. We need to make sure it is creating the files and can view documents within the software only. What can be done on the folder for Q1? Would appreciate the help

    D N 2 Replies Last reply
    0
    • S Seuss

      Hi I am in need of help please as I am not familiar with the folder permissions stuff. Everyone has access to a particular folder where the files are held. Q1. The folder permissons have 'EVERYONE' set to tick on everything Full control Modify Read & Execute List Folder contents Read There is also [company name]/Administrators - they have the same settings as above. There is another group for everyone [CompanyName]/[CompanyName] How can we prevent access to this folder for everyone? The problem is in the VB.Net application, there are some forms that creates a file in that folder and 'everyone' who logs into this application are allowed to generate a file that is written to this folder BUT we don't want them having access to the folder to see all the files. The software (VB.Net) actually generates files by a logged in user but they shouldn't be able to access the folder when they go to the My Computer->Network->Folder. We need to make sure it is creating the files and can view documents within the software only. What can be done on the folder for Q1? Would appreciate the help

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

      Considering a Windows Forms application runs AS THE USER THAT LAUNCHES IT, so your security isn't really going to work. At BEST, what you're going to be able to do is prevent users from casually looking in the folder to see, well, nothing. The user wouldn't be able to see the files in the folder. All you have to do is turn off the "List folder contents" permission. I said "casually" for a reason. Users and/or administrators will still be able turn that permission back on and easily see the files in the folder. You basically have no recourse to do what you want. In order for the application to work on the files it needs to it needs a certain minimum set of permissions. That means that the users running the application need those permissions. You set permissions on users and groups of users, not applications. Oh, and nothing in a forum environment is "urgent". Everyone here volunteers whatever time they have to answering questions on forums.

      A guide to posting questions on CodeProject

      Click this: Asking questions is a skill. Seriously, do it.
      Dave Kreskowiak

      1 Reply Last reply
      0
      • S Seuss

        Hi I am in need of help please as I am not familiar with the folder permissions stuff. Everyone has access to a particular folder where the files are held. Q1. The folder permissons have 'EVERYONE' set to tick on everything Full control Modify Read & Execute List Folder contents Read There is also [company name]/Administrators - they have the same settings as above. There is another group for everyone [CompanyName]/[CompanyName] How can we prevent access to this folder for everyone? The problem is in the VB.Net application, there are some forms that creates a file in that folder and 'everyone' who logs into this application are allowed to generate a file that is written to this folder BUT we don't want them having access to the folder to see all the files. The software (VB.Net) actually generates files by a logged in user but they shouldn't be able to access the folder when they go to the My Computer->Network->Folder. We need to make sure it is creating the files and can view documents within the software only. What can be done on the folder for Q1? Would appreciate the help

        N Offline
        N Offline
        Nitzan Levi
        wrote on last edited by
        #3

        you need to change the user that your application is running under. see samples: User Impersonation in .NET[^] http://stackoverflow.com/questions/1168571/run-code-as-a-different-user-c[^] http://stackoverflow.com/questions/125341/how-do-you-do-impersonation-in-net/7250145#7250145[^]

        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