none
granting groups access to directories and files RRS feed

  • Question

  • I'm trying to grant access for domain groups to directories and files (on a remote server).

    For this i basically use the code as given on this page http://msdn.microsoft.com/en-us/library/d49cww7f.aspx more specific:
    FileSystemAccessRule(account, rights, controlType) the problem is that this works great when a user (domain\username) is specified for 'account' but when i specify a group (domain\groupname) I get en error stating that the identity cannot be found. My question is how do i grant access for a domain group to a directory and why doesn't the example for usernames work for groupnames.


    Tuesday, August 28, 2012 4:26 PM

Answers

  • Hi Jschenk,

    Welcome to the MSDN Forum.

    Before try this code, I suggest you try it manually.

    I am trying to reproduce this issue, and I found:

    When I try a AD group, it work great, but when I try an email group, it failed.

    So I assume the group you mentioned may be a email group, not AD group, or domain group.

    Please feel free to correct me, if I misunderstood anything.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by jschenk Thursday, August 30, 2012 7:52 AM
    Wednesday, August 29, 2012 11:04 AM
    Moderator
  • Mike, thanks a lot for your reply, I seem to have solved it, although It was not exactly what you mentioned, but it surely put me on the right path.

    I have been trying so many options that what i finally tested was not a domain group but a local group (workstationname\Users) on the workstation it self.

    When I do use a domain group it works as you describe.
    So most likely my remote server is unable to determine the SID of this local workstation group when it has only a fileshare connection.

    Probably it is a well known SID (?) so I should be able to assign it the SID directly.

    But for now I have used the domain\users group and that als works.

    Thanks a lot for putting e on the right path by testing a domain group again.

    I tried this earlier, buit some logical code error probably prevented a succesfull test.

    Thursday, August 30, 2012 7:51 AM

All replies

  • Hi Jschenk,

    Welcome to the MSDN Forum.

    Before try this code, I suggest you try it manually.

    I am trying to reproduce this issue, and I found:

    When I try a AD group, it work great, but when I try an email group, it failed.

    So I assume the group you mentioned may be a email group, not AD group, or domain group.

    Please feel free to correct me, if I misunderstood anything.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by jschenk Thursday, August 30, 2012 7:52 AM
    Wednesday, August 29, 2012 11:04 AM
    Moderator
  • Mike, thanks a lot for your reply, I seem to have solved it, although It was not exactly what you mentioned, but it surely put me on the right path.

    I have been trying so many options that what i finally tested was not a domain group but a local group (workstationname\Users) on the workstation it self.

    When I do use a domain group it works as you describe.
    So most likely my remote server is unable to determine the SID of this local workstation group when it has only a fileshare connection.

    Probably it is a well known SID (?) so I should be able to assign it the SID directly.

    But for now I have used the domain\users group and that als works.

    Thanks a lot for putting e on the right path by testing a domain group again.

    I tried this earlier, buit some logical code error probably prevented a succesfull test.

    Thursday, August 30, 2012 7:51 AM
  • Hi Jschenk,

    You are welcome.

    And thank you for sharing your research result. I have marked your post as answer, too. I think it will also light the other community members which have similar issues on.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, August 30, 2012 9:03 AM
    Moderator