[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

what to extract user folder permissions

What is the command to find what permissions a specific user has on all folders on the drive E.
0
Enclave Technologies
Asked:
Enclave Technologies
  • 2
1 Solution
 
BelushiLomaxCommented:
cacls in XP/2003, icacls in 08 or Win7:
These can both be output to a text file. Both built in to Windows.

 NOTE: Cacls is now deprecated, please use Icacls.

 Displays or modifies access control lists (ACLs) of files

 CACLS filename [/T] [/M] [/L] [/S[:SDDL]] [/E] [/C] [/G user:perm]
        [/R user [...]] [/P user:perm [...]] [/D user [...]]
    filename      Displays ACLs.
    /T            Changes ACLs of specified files in
                  the current directory and all subdirectories.
    /L            Work on the Symbolic Link itself versus the target
    /M            Changes ACLs of volumes mounted to a directory
    /S            Displays the SDDL string for the DACL.
    /S:SDDL       Replaces the ACLs with those specified in the SDDL string
                  (not valid with /E, /G, /R, /P, or /D).
    /E            Edit ACL instead of replacing it.
    /C            Continue on access denied errors.
    /G user:perm  Grant specified user access rights.
                  Perm can be: R  Read
                               W  Write
                               C  Change (write)
                               F  Full control
    /R user       Revoke specified user's access rights (only valid with /E).
    /P user:perm  Replace specified user's access rights.
                  Perm can be: N  None
                               R  Read
                               W  Write
                               C  Change (write)
                               F  Full control
    /D user       Deny specified user access.
 Wildcards can be used to specify more than one file in a command.
 You can specify more than one user in a command.

 Abbreviations:
    CI - Container Inherit.
         The ACE will be inherited by directories.
    OI - Object Inherit.
         The ACE will be inherited by files.
    IO - Inherit Only.
         The ACE does not apply to the current file/directory.
    ID - Inherited.
         The ACE was inherited from the parent directory's ACL.
0
 
Enclave TechnologiesAuthor Commented:
The above would work for one folder but the problem is this is a server data drive and there are lots of folders that the user has permissions to .I need a command or a cmdlet that will tell me what permissions a particular user has on ALL folders on the data drive.
0
 
BelushiLomaxCommented:
I guess thats why MS deprecated cacls for icacls. There are others like subinacl or xcacls but that'd be a last resort for me.
You can easily find a powershell or vb script to do this, but Auditing will do it also, you just have to configure it but it's built in to MS Servers.
You may be able to do it thru the File Server Resource Manager, but I havent tried before to set that up there...

I know I can use icacls to traverse all subdirectories and check, set, change perms. Set it to run at the root of the drive  with the /T switch and output to text file.

From icacls command prompt:
 icacls c:\windows\* /save AclFile /T
 - Will save the ACLs for all files under c:\windows
   and its subdirectories to AclFile.

Icacls will perform immediate results (would be my first choice if this is a one off inquiry)
Auditing would be first if this was a long term monitoring situation.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now