![]() |
Directory Security
So Right now I'm working on Directory Security permissions. I have the following code:
:
|
|
Yeah the chances are the directory should already exist - so if you create it, then alter access rules it should work, if you as the user running the program have the rights to do so.
try something like this, although its in C# should be easy to translate, if you need help tell me... :
|
@Wizard: That helps a little in the sense of looping through each of the User Permissions.
@John: Thats what I had before and it would not work, as well as you are missing the part where you apply the access rules to the folder. What I'm currently having problems is, setting the owner of a folder and then making it so it wont inherit permissions, but will have the ability to replace on lower objects. No inherit so that no matter where you put the folder, the people will always have access to it. Replace Permissions on Child objects because I have a System like this: User Folder .....User Documents .....User Desktop .....User Scripts .....User Shared As well as when I do the Code in my OP, It will add the user, but wont set any permissions. I will probably be working on it about 11 to 12 hours from now. Thanks for all your help. |
Are you getting any exceptions on execution of the code?
If so what are the details? Does the user belong to a domain? ie Can the name be passed as "Domain\\MyUser"? I cant see the problem with my code, once the SetAccessControl method has been called relevantly - though the MSDN documentation yields this: Directory Security Example The only difference I can see is that the directory creation and information object instantiation occur as individual statements (ie, the directory already exists, or would have been created earlier), not that it should alter behaviour any. |
| All times are GMT -5. The time now is 2:41 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC