亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 編程 > BAT > 正文

設置高級NTFS權限的工具 XCACLS.vbs

2020-07-26 20:34:36
字體:
來源:轉載
供稿:網友
http://support.microsoft.com/kb/825751

Microsoft 以 Microsoft Visual Basic 腳本 (Xcacls.vbs) 的形式提供了 Extended Change Access Control List(擴展更改訪問控制列表)工具 (Xcacls.exe) 的更新版本。本文分步介紹如何使用 Xcacls.vbs 腳本修改和查看文件或文件夾的 NTFS 文件系統權限。 可以從命令行使用 Xcacls.vbs 設置所有可在 Microsoft Windows 資源管理器中訪問的文件系統安全選項。Xcacls.vbs 可顯示和修改文件的訪問控制列表 (ACL)。

注意:Xcacls.vbs 只與 Microsoft Windows 2000、Microsoft Windows XP 和 Microsoft Windows Server 2003 兼容。Microsoft 不支持 Xcacls.vbs。

回到頂端
設置和使用 Xcacls.vbs
要設置和使用 Xcacls.vbs,請按照下列步驟操作:
從以下 Microsoft 網站獲得 Xcacls.vbs 的最新版本:
http://download.microsoft.com/download/f/7/8/f786aaf3-a37b-45ab-b0a2-8c8c18bbf483/XCacls_Installer.exe (http://download.microsoft.com/download/f/7/8/f786aaf3-a37b-45ab-b0a2-8c8c18bbf483/xcacls_installer.exe)
雙擊“Xcacls_Installer.exe”。當提示您提供放置提取文件的位置時,請指定一個位于計算機的搜索路徑設置中的文件夾(如 C:/Windows)。
將默認腳本引擎從 Wscript 更改為 Cscript。(Xcacls.vbs 腳本最適合在 Cscript 下運行。)為此,請在命令提示符下鍵入以下內容,然后按 Enter:
cscript.exe /h:cscript
注意:將默認腳本引擎更改為 Cscript 只影響腳本向屏幕寫入的方式。Wscript 根據“確定”對話框分別寫入每一行。Cscript 將每一行寫入命令窗口。如果您不想更改默認腳本引擎,則必須使用以下命令運行腳本
cscript.exe xcacls.vbs
但是,如果將默認腳本更改為 Cscript,則可以使用以下命令運行該腳本:
xcacls.vbs
.
要查看 Xcacls.vbs 的命令語法,請在命令提示符處鍵入下面的命令:
xcacls.vbs /?
Xcacls.vbs 命令的語法
下面 xcacls.vbs /? 命令的輸出描述了 Xcacls.vbs 命令的語法:
復制代碼 代碼如下:

Usage:
XCACLS filename [/E] [/G user:perm;spec] [...] [/R user [...]]
[/F] [/S] [/T]
[/P user:perm;spec [...]] [/D user:perm;spec] [...]
[/O user] [/I ENABLE/COPY/REMOVE] [/N
[/L filename] [/Q] [/DEBUG]

filename [Required] If used alone, it displays ACLs.
(Filename can be a filename, directory name or
wildcard characters and can include the whole
path. If path is missing, it is assumed to be
under the current directory.)
Notes:
- Put filename in quotes if it has spaces or
special characters such as &, $, #, etc.
- If filename is a directory, all files and
subdirectories under it will NOT be changed
unless the /F or S is present.

/F [Used with Directory or Wildcard] This will change all
files under the inputted directory but will NOT
traverse subdirectories unless /T is also present.
If filename is a directory, and /F is not used, no
files will be touched.

/S [Used with Directory or Wildcard] This will change all
subfolders under the inputted directory but will NOT
traverse subdirectories unless /T is also present.
If filename is a directory, and /S is not used, no
subdirectories will be touched.

/T [Used only with a Directory] Traverses each
subdirectory and makes the same changes.
This switch will traverse directories only if the
filename is a directory or is using wildcard characters.
/E Edit ACL instead of replacing it.

/G user:GUI Grant security permissions similar to Windows GUI
standard (non-advanced) choices.
/G user:Perm;Spec Grant specified user access rights.
(/G adds to existing rights for user)

User: If User has spaces in it, enclose it in quotes.
If User contains #machine#, it will replace
#machine# with the actual machine name if it is a
non-domain controller, and replace it with the
actual domain name if it is a domain controller.

New to 3.0: User can be a string representing
the actual SID, but MUST be lead by SID#
Example: SID#S-1-5-21-2127521184-160...
(SID string shown has been shortened)
(If any user has SID# then globally all
matches must match the SID (not name)
so if your intention is to apply changes
to all accounts that match Domain/User
then do not specify SID# as one of the
users.)

GUI: Is for standard rights and can be:
Permissions...
F Full control
M Modify
X read and eXecute
L List folder contents
R Read
W Write
Note: If a ; is present, this will be considered
a Perm;Spec parameter pair.

Perm: Is for "Files Only" and can be:
Permissions...
F Full control
M Modify
X read and eXecute
R Read
W Write
Advanced...
D Take Ownership
C Change Permissions
B Read Permissions
A Delete
9 Write Attributes
8 Read Attributes
7 Delete Subfolders and Files
6 Traverse Folder / Execute File
5 Write Extended Attributes
4 Read Extended Attributes
3 Create Folders / Append Data
2 Create Files / Write Data
1 List Folder / Read Data
Spec is for "Folder and Subfolders only" and has the
same choices as Perm.

/R user Revoke specified user's access rights.
(Will remove any Allowed or Denied ACL's for user.)

/P user:GUI Replace security permissions similar to standard choices.

/P user:perm;spec Replace specified user's access rights.
For access right specification see /G option.
(/P behaves like /G if there are no rights set for user.)

/D user:GUI Deny security permissions similar to standard choices.
/D user:perm;spec Deny specified user access rights.
For access right specification see /G option.
(/D adds to existing rights for user.)

/O user Change the Ownership to this user or group.

/I switch Inheritance flag. If omitted, the default is to not touch
Inherited ACL's. Switch can be:
ENABLE - This will turn on the Inheritance flag if
it is not on already.
COPY - This will turn off the Inheritance flag and
copy the Inherited ACL's
into Effective ACL's.
REMOVE - This will turn off the Inheritance flag and
will not copy the Inherited
ACL's. This is the opposite of ENABLE.
If switch is not present, /I will be ignored and
Inherited ACL's will remain untouched.

/L filename Filename for Logging. This can include a path name
if the file is not under the current directory.
File will be appended to, or created if it does not
exit. Must be Text file if it exists or error will occur.

If filename is omitted, the default name of XCACLS will
be used.

/Q Turn on Quiet mode. By default, it is off.
If it is turned on, there will be no display to the screen.


/DEBUG Turn on Debug mode. By default, it is off.
If it is turned on, there will be more information
displayed and/or logged. Information will show
Sub/Function Enter and Exit as well as other important
information.

/SERVER servername Enter a remote server to run script against.

/USER username Enter Username to impersonate for Remote Connections
(requires PASS switch). Will be ignored if it is for a Local Connection.

/PASS password Enter Password to go with USER switch
(requires USER switch).


Wildcard characters can be used to specify more than one file in a command, such as:
* Any string of zero or more characters
? Any single character

You can specify more than one user in a command.
You can combine access rights.

使用 Xcacls.vbs 查看權限

Xcacls.vbs 還可用于查看文件或文件夾的權限。 例如,如果您有一個名為 C:/Test 的文件夾,在命令提示符處鍵入以下命令以查看文件夾權限,然后按 Enter:
xcacls.vbs c:/test
下面的示例是一個典型結果:
復制代碼 代碼如下:

C:/>XCACLS.VBS c:/test
Microsoft (R) Windows Script Host 5.6
版權所有 (C) Microsoft Corporation 1996-2001。保留所有權利。

Starting XCACLS.VBS (Version: 3.4) Script at 6/11/2003 10:55:21 AM

Startup directory:
"C:/test"

Arguments Used:
Filename = "c:/test"



**************************************************************************
Directory:C:/test

Permissions:
Type Username Permissions Inheritance

Allowed BUILTIN/Administrators Full Control This Folder, Subfolde
Allowed NT AUTHORITY/SYSTEM Full Control This Folder, Subfolde
Allowed Domain1/User1 Full Control This Folder Only
Allowed /CREATOR OWNER Special (Unknown) Subfolders and Files
Allowed BUILTIN/Users Read and Execute This Folder, Subfolde
Allowed BUILTIN/Users Create Folders / Appe This Folder and Subfo
Allowed BUILTIN/Users Create Files / Write This Folder and Subfo

No Auditing set

Owner:Domain1/User1

注意:在該示例中,xcacls.vbs c:/test 命令的輸出與顯示在圖形用戶界面 (GUI) 的文本一致。命令窗口的一些文字不完整。

輸出還給出了腳本的版本、啟動目錄和使用的參數。

您還可以使用通配符來顯示目錄下匹配的文件。例如,如果鍵入以下命令,將會顯示 C:/Test 文件夾中所有具有“.log”擴展名的文件:
xcacls.vbs c:/test/*.log
示例

下列 Xcacls.vbs 命令提供 Xcacls.vbs 用法的一些示例:

xcacls.vbs c:/test/ /g domain/testuser1:f /f /t /e
該命令可編輯現有權限。它授予 Domain/TestUser1 完全控制 C:/Test 下所有文件的權限,遍歷 C:/Test 下的子文件夾,然后更改找到的所有文件。該命令不觸及目錄。
xcacls.vbs c:/test/ /g domain/testuser1:f /s /l "c:/xcacls.log"
該命令可替換現有權限。它授予 Domain/TestUser1 完全控制 C:/Test 下所有子文件夾的權限,而且記錄到 C:/Xcacls.log。該命令不觸及文件,并且不遍歷目錄。
xcacls.vbs c:/test/readme.txt /o "machinea/group1"
該命令將自述文件的所有者更改為組 MachineA/Group1。
xcacls.vbs c:/test/badcode.exe /r "machinea/group1" /r "domain/testuser1"
該命令撤消 MachineA/Group1 和 Domain/TestUser1 的 C:/Test/Badcode.exe 權限。
xcacls.vbs c:/test/subdir1 /i enable /q
該命令將打開文件夾 C:/Test/Subdir1 上的繼承。該命令將取消任何屏幕輸出。
xcacls.vbs //servera/sharez/testpage.htm /p "domain/group2":14
此命令通過使用 Windows Management Instrumentation (WMI) 遠程連接到 //ServerA/ShareZ。然后獲取用于該共享的本地路徑,在該路徑下,它更改 Testpage.htm 上的權限。它原封保留 Domain/Group2 的現有權限,但是添加權限 1(讀取數據)和權限 4(讀取擴展屬性)。該命令放棄此文件上的其他權限,原因是未使用 /e 開關。
xcacls.vbs d:/default.htm /g "domain/group2":f /server servera /user servera/admin /pass password /e
該命令使用 WMI 作為 ServerA/Admin 遠程連接到 ServerA,然后將 Default.htm 上的完全權限授予 Domain/Group2。Domain/Group2 的現有權限丟失,但保留文件上的其他權限。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
久久精品国产亚洲精品| 欧美黑人巨大精品一区二区| 在线成人激情黄色| 日韩视频在线一区| 日韩欧美极品在线观看| 国产午夜精品久久久| 国产成人精品在线| 中文字幕在线亚洲| 日韩黄在线观看| 亚洲精品aⅴ中文字幕乱码| 亚洲最大激情中文字幕| 午夜精品久久久久久久99热| 久久在线免费观看视频| 精品中文字幕在线观看| 丝袜美腿精品国产二区| 精品露脸国产偷人在视频| 亚洲伊人久久综合| 中文欧美日本在线资源| 热久久这里只有| 国产精品久久久久久久久久久久久久| 国产日韩精品综合网站| 欧美日韩精品二区| 性欧美xxxx交| 欧洲成人午夜免费大片| 国产一区二区在线免费视频| 欧美激情精品久久久久久大尺度| 黑人巨大精品欧美一区二区| 欧美在线观看视频| 久久久久久国产精品三级玉女聊斋| 中日韩午夜理伦电影免费| 国产69久久精品成人| 成人av在线天堂| 亚洲精品大尺度| 国产精品视频色| 亚洲欧美在线一区二区| 亚洲在线观看视频| 欧美一区二区三区免费视| 亚洲国产精久久久久久| 66m—66摸成人免费视频| 欧美一级bbbbb性bbbb喷潮片| 国产亚洲xxx| 亚洲色图校园春色| 欧美在线欧美在线| 久久99热这里只有精品国产| 久久综合久久美利坚合众国| 日韩欧美综合在线视频| 日本久久久久久久久久久| 精品综合久久久久久97| 亚洲国产精品99久久| 菠萝蜜影院一区二区免费| 国产精品成人在线| 精品网站999www| 欧美日韩国产影院| 午夜精品一区二区三区av| 成人激情在线观看| 岛国av一区二区| 中文在线资源观看视频网站免费不卡| 欧美日韩国产丝袜美女| 91人成网站www| 国产免费一区二区三区在线观看| 青青在线视频一区二区三区| 国产一区二区三区三区在线观看| 91网站在线看| 亚洲欧美中文日韩在线v日本| 亚洲欧洲成视频免费观看| 欧美黑人性生活视频| 欧美日韩国产丝袜美女| 精品久久香蕉国产线看观看亚洲| 91精品视频一区| 国产精品热视频| 亚洲人免费视频| 亚洲欧美激情精品一区二区| 亚洲色图综合久久| 永久555www成人免费| 一区二区在线视频| 欧美大胆在线视频| 成人久久久久久久| 亚洲二区在线播放视频| 日韩www在线| 亚洲国产高清自拍| 91香蕉电影院| 国产精品激情自拍| 亚洲精品二三区| 日韩专区在线播放| 97超级碰碰碰| 亚洲国产成人精品久久久国产成人一区| 亚洲欧美视频在线| 成人黄色在线免费| 日韩最新av在线| 欧美最猛性xxxxx亚洲精品| 亚洲欧洲第一视频| 久久国产精品99国产精| 亚洲片av在线| 久久久在线视频| 亚洲老头老太hd| 欧美精品videos另类日本| 久久视频在线直播| 日韩av日韩在线观看| 亚洲电影第1页| 久久久久久久久久久久久久久久久久av| 亚洲免费视频在线观看| 亚洲欧美在线免费观看| 日本三级韩国三级久久| 国产精品久久久一区| 欧美成人精品一区二区三区| 岛国av一区二区在线在线观看| 91网站免费看| 最新的欧美黄色| 夜夜嗨av色一区二区不卡| 亚洲人成电影网站色xx| 亚洲天堂av在线免费观看| 中文字幕精品在线| 久久天天躁日日躁| 色一情一乱一区二区| 欧美在线xxx| 在线播放国产一区二区三区| 国产精品69精品一区二区三区| www.久久撸.com| 欧美午夜视频一区二区| 欧美成人黑人xx视频免费观看| 欧美野外wwwxxx| 欧美精品videos性欧美| 国产精品美女午夜av| 午夜精品久久久久久久久久久久久| 久久久久国产精品免费| 欧美一级大片在线免费观看| 97香蕉久久夜色精品国产| 色一区av在线| 欧美老女人在线视频| 青青草99啪国产免费| 成人午夜在线视频一区| 日韩大片免费观看视频播放| www日韩欧美| 97在线观看免费高清| 久久久av电影| 日韩视频免费在线观看| 久久6免费高清热精品| 日韩精品日韩在线观看| 国产成人午夜视频网址| 欧美性生交xxxxxdddd| 精品成人久久av| 北条麻妃一区二区三区中文字幕| 精品无人区乱码1区2区3区在线| 欧美成人免费在线观看| 亚洲精品在线看| 日韩av电影手机在线| 欧美精品国产精品日韩精品| 亚洲自拍欧美色图| 国自在线精品视频| 91地址最新发布| 亚洲电影免费观看高清完整版| 九九热在线精品视频| 美女性感视频久久久| 国产精品嫩草视频| 欧美激情在线播放| 亚洲欧洲视频在线| 国产精品国产自产拍高清av水多| 国产不卡精品视男人的天堂| 久久视频在线看| 日韩经典中文字幕在线观看| 超碰91人人草人人干| 国产精品久久久久久超碰| 国产综合久久久久| 亚洲国产精久久久久久久|