Back up the NTFS ACL list in text form

xiaoxiao2021-03-06  14

Now the file server access list is too confusing, wants all to reset, and plan to access all files first, then slowly reconstruct it as needed, but you want to back up the list and rebuild. Is there a way, is there a minimum backup?

Back up the NTFS ACL list in text form.

Solution:

Suitable for 2000 / xp / 2003

2000 / XP / 2003 has a cacls command, which is as follows:

Display or modify file access control tables (ACL)

Cacls filename [/ t] [/ e] [/ c] [/ g user: perm] [/ r user [...]]

[/ P User: perm [...]] [/ d user [...]]

FileName shows the ACL.

/ T Change the current directory and all the subdirectory

Specify the ACL of the file.

/ E Edit the ACL without replacing.

/ C Continue when a refusal access error occurs.

/ G user: perm gives the specified user access.

Perm can be: R reading

W Write

C Change (write)

F complete control

/ R User revoked the user's access (justice only when used with / e).

/ P User: Perm replaces the specified user's access.

Perm can be: N

R read

W Write

C Change (write)

F complete control

/ D User refuses to specify the user's access.

You can specify multiple files using wildcards in the command.

You can also specify multiple users in the command.

abbreviation:

Ci - container inheritance.

ACE will inherit by the directory.

OI - object inheritance.

ACE will inherit by the file.

IO - only inherits.

ACE does not apply to the current file / directory.

This example is used as follows:

First add a parameter T, so you can list all subdirectories and files.

Then add an output redirector to output it to a text file.

For example, I want to display all files or folder ACLs under D: / Temp

Cacls D: / Temp / T> C: /acls.txt

Then go to C: /ACls.txt, all listed.

转载请注明原文地址:https://www.9cbs.com/read-47888.html

New Post(0)