Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6926785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:57:48+00:00 2026-05-27T10:57:48+00:00

I have a folder with some heavy restrictions on it. For one user, this

  • 0

I have a folder with some heavy restrictions on it. For one user, this person can see if a file exists, but cannot copy the file out, open the file, etc. The ONLY thing they can do is to see if the file exists.

When I look at the top-level, I see List folder contents is checked. That’s the ONLY permission they are allowed to have.

enter image description here

Now, when use C# to pull the rights, I see that SEVERAL items are set, not just one. And when I look deeper into the rights, I see that at this lower level, the corresponding items are checked.

enter image description here

When I get the rights to this folder, it shows that the folder has “READ” access because the low-level flag for read is set. HOWEVER, I’ve tested with this user’s account. They most certainly do not have read access.

If I re-create a new folder and set the rights as listed here, the user can then copy files out of the new folder, which they should NOT be able to do.

I don’t understand the Windows security model.

How can I verify that the user has LIST access, but not READ access? What would I query for, specifically? NOTE: Querying for “List Folder/Read Data” but not “Read Permissions” does NOT work, as you can see below. Both of those are apparently set by the higher-level “List Folder Contents” option.

UPDATE:

I’m including the code snip I use to pull the information. Maybe that will help define what I’m looking for.

    internal void GroupsFromPath(string pth, bool IncludeInherited)
    {
        DirectorySecurity ds;
        try
        {
            DirectoryInfo di = new DirectoryInfo(pth);
            ds = di.GetAccessControl(AccessControlSections.Access);
        }
        catch
        {
            return ret;
        }

        AuthorizationRuleCollection acl = ds.GetAccessRules(true, 
                IncludeInherited, typeof(NTAccount));

        foreach (FileSystemAccessRule ace in acl)
        {
            bool L = CheckRights(ace, FileSystemRights.Traverse |
                FileSystemRights.ListDirectory);

            bool R = CheckRights(ace, FileSystemRights.Read);
            bool W = CheckRights(ace, FileSystemRights.Modify);

            DO_MAGIC(pth, L, R, W);
        }
    }

    private bool CheckRights(FileSystemAccessRule ACE, 
            FileSystemRights fileSystemRights)
    {
        bool r = ((ACE.FileSystemRights & fileSystemRights) == fileSystemRights) 
            && (ACE.AccessControlType == AccessControlType.Allow);

        return r;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:57:49+00:00Added an answer on May 27, 2026 at 10:57 am

    For LIST access you have to make sure that the permissions only apply to “This folder and subfolders” (see your screenshot).

    The FileSystemAccessRule‘s InheritanceFlags property must be set to InheritanceFlags.ContainerInherit and the PropagationFlags property must be set to PropagationFlags.None.

    For a complete list (InheritanceFlags/PropagationFlags) see the blog of Damir Dobric.

    BEGIN EDIT

    To check whether or not a given FileSystemAccessRule realizes “List Folder Content Only” permissions
    you can use the following method (using the InheritanceFlags and PropagationFlags properties):

    private static bool CheckListFolderContentOnly(FileSystemAccessRule ace)
    {
      if (ace.PropagationFlags == PropagationFlags.None &&
          ace.InheritanceFlags == InheritanceFlags.ContainerInherit &&
          ace.FileSystemRights == (FileSystemRights.ReadAndExecute | FileSystemRights.Synchronize))
      {
        return true;
      }
    
      return false;
    }
    

    END EDIT

    Hope, this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this php web app, and one of my folder contains some
I have some folder with different files. I want to use something like this:
Can anybody guide me in the right direction... I have some folder strucktures that
I have a folder C:\Images which has a some images. This folder is not
I have a folder in my C: drive as C:\app_config\java_app This folder contains some
I have this python script which sits in /some/folder/foo.py So if I am in
I have a folder in '/sites/all/libraries/folder'. In this folder some html files are automatically
I have a folder in my webserver with some aspx pages that can only
I can't understand some strange thing. I have folder structure: application/ controllers/ forms/ models/
I have a formed file in some folder on server. I need to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.