Folder Permissions - Urgent Help Please
-
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
-
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
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 -
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
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[^]