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

首頁 > 編程 > VBScript > 正文

使用xcacls.vbs(cacls.exe)修改NTFS權限說明(中文版)

2020-03-24 16:32:25
字體:
來源:轉載
供稿:網友
概要
Microsoft 以 Microsoft Visual Basic 腳本 (Xcacls.vbs) 的形式提供了 Extended Change Access Control List(擴展更改訪問控制列表)工具 (Xcacls.exe) 的更新版本。本文分步介紹如何使用 Xcacls.vbs 腳本修改和查看文件或文件夾的 NTFS 文件系統權限。 可以從命令行使用 Xcacls.vbs 設置所有可在 Microsoft Windows 資源管理器中訪問的文件html' target='_blank'>系統安全選項。Xcacls.vbs 可顯示和修改文件的訪問控制列表 (ACL)。

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


設置和使用 Xcacls.vbs
要設置和使用 Xcacls.vbs,請按照下列步驟操作:
1. 從以下 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.vbs直接下載http://xiazai.phpstudy.net/201008/tools/XCACLS.rar
2. 雙擊“Xcacls_Installer.exe”。當提示您提供放置提取文件的位置時,請指定一個位于計算機的搜索路徑設置中的文件夾(如 C:/Windows)。
3. 將默認腳本引擎從 Wscript 更改為 Cscript。(Xcacls.vbs 腳本最適合在 Cscript 下運行。)為此,請在命令提示符下鍵入以下內容,然后按 Enter:
cscript.exe /h:cscript
注意:將默認腳本引擎更改為 Cscript 只影響腳本向屏幕寫入的方式。Wscript 根據“確定”對話框分別寫入每一行。Cscript 將每一行寫入命令窗口。如果您不想更改默認腳本引擎,則必須使用以下命令運行腳本
cscript.exe xcacls.vbs
但是,如果將默認腳本更改為 Cscript,則可以使用以下命令運行該腳本:
xcacls.vbs
.
4. 要查看 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 /? 命令的輸出描述了 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 [要求]如果單獨地使用,它顯示ACL。
(文件名能是一文件名并且能包括全部道路,目錄名字orwildcard性格。
如果道路是丟失的,beunder當前的目錄假定的。)
注意到:
- 如果它有諸如的空間或者特殊的性格,將文件名放在行情中 &, $, #, 等等.
- 如果文件名是一個目錄,所有文件和在它之下的子目錄將不被改變除非與F或者S是出席的.

/F [與目錄或者通配符使用]這將改變所有在輸入目錄之下的文件但是將不橫過子目錄除非與T是也出席的.
如果文件名是一個目錄,和與F將不是加以使用,沒有文件將被觸到。

/S [與目錄或者通配符使用]這將改變所有在輸入目錄之下的subfolders但是將不橫過子目錄除非與T是也出席的。
如果文件名是一個目錄,和與S將不是加以使用,沒有子目錄將被觸到。

/T [僅僅與一個目錄使用]橫過每一子目錄并且制定同樣的改變。
這個開關將橫過目錄僅當文件名是一個目錄或者使用通配符。
/E 編輯ACL而不是替換它。

/G user:GUI 應允類似于Windows GUI的安全允許標準(非先進)的選擇。
/G user:Perm;Spec 給予指定用戶接近權利。
(/G 為了用戶予以添加到現有的權利)

用戶: 如果用戶在其中有空間,在行情中封入它。
如果用戶包含#machine#,它將替換 #帶有實際的機器名字的machine#如果它是a 非領域控制器,
并且以替換它實際的域名如果它是一個領域控制器。

對3.0不熟悉: 用戶能是串代表實際的SID,但是肯定SID的引導#
例子: SID#S-1-5-21-2127521184-160...
(SID串顯示已被縮短)
(如果任何用戶有SID#然后在全球所有比賽必須匹配SID (不命名) 那么如果你的意圖
是運用改變對于與領域/用戶匹配的所有原由然后,不要把SID#不規定成為的一用戶。)

圖形: 為了標準權利并且能:
權限...
F 完全控制
M 修改
X 讀取并且執行
L 列出文件夾內容
R 讀取
W 寫入
注意: 如果 a ; 是當前的, 這將被考慮
一Perm;Spec參數雙。

Perm: 為了“只有文件”并且能:
權限...
F 完全控制
M 修改
X 讀取并且執行
R 讀取
W 寫入
高級的...
D 獲取所有權
C 改變允許
B 閱讀允許
A 刪除
9 寫屬性
8 讀取屬性
7 刪除子文件夾和文件
6 穿過文件夾 / 執行文件
5 寫擴展的屬性
4 讀取擴展的屬性
3 創建文件夾 / 附加數據
2 創建文件 / 寫數據
1 列出文件夾 / 讀取數據
Spec為了“只有文件夾和子文件夾”并且有作為Perm的同樣的選擇。

/R user 撤銷指定的用戶的接近權利。
(將移去ACL為了用戶允許或者予以否認的任何。)

/P user:GUI 替換類似于標準的選擇的安全允許。

/P user:perm;spec 替換被指定的用戶存取權利。
為存取權說明參見/G 選項。
(/P 表現象/G 如果沒有權利被設置為用戶。)
/D user:GUI 拒絕類似于標準的選擇的安全允許。
/D user:perm;spec 拒絕指定的用戶接近權利。
為存取權說明參見/G 選項。
(/D 添加在現有的右邊為用戶。)
/O user 改變所有權到這個用戶或組。

/I switch 繼承標志。如果省去, 默認值將不接觸
被繼承的ACL's 。切換可能是:
ENABLE - 如果它已經不打開,這將打開繼承標志
COPY - 這將關閉繼承標志和將復制被繼承的ACL's
到有效的ACL中` s。
REMOVE - 這將關閉繼承標志并且將不復制繼承的ACL ` s。
這是實現的相反的。
如果切換不是存在, /I 將被忽略并且被繼承的ACL's 將保留未觸動過。

/L filename 記錄的文件名. 如果文件不是在當前的目錄下面這可能包括路徑名字。
是否它不退出,文件將被附加到,或者創造。如果它存在,肯定正文文件或者差錯將發生。

如果文件名被省去, XCACLS 的缺省名將被使用。

/Q 打開安靜的方式。缺省,它離開。
如果它被打開,將沒有顯示到屏幕。


/DEBUG 打開調試方式。缺省,它離開。
如果它打開, 有將是更多信息被顯示并且/或者被記錄。
信息顯示Sub/Function 進入和退出并且其它重要信息。

/SERVER servername 輸入一臺遠程服務器運行腳本針對。

/USER username 進入用戶名扮演為遠程連接數(要求通過切換) 。將被忽略如果它是為局部連接數。

/PASS password 輸入口令連同用戶切換
(要求用戶切換).


通配符可能被使用指定超過一個文件在一個指令, 譬如:
* 零個或更多字符任何字符串
? 任何單一字符

你能在一種命令中規定超過一個用戶。
你能結合接近權利。

==========================================================



使用 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 的現有權限丟失,但保留文件上的其他權限。


參考
有關如何使用 Xcacls.exe 其他信息,請單擊下面的文章編號,以查看 Microsoft 知識庫中相應的文章:
318754 (http://support.microsoft.com/kb/318754/) 如何使用 Xcacls.exe 修改 NTFS 權限

html教程

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
午夜精品一区二区三区在线播放| 亚洲精品美女免费| 国产在线观看精品| 狠狠躁夜夜躁人人爽超碰91| 国产一区二区三区视频免费| 日韩中文字幕在线| 在线视频日本亚洲性| 国产精品青草久久久久福利99| 欧美性在线观看| 精品国产电影一区| 亚洲国产精品va在看黑人| 国产亚洲综合久久| 国产精品无av码在线观看| 欧美精品videos性欧美| 97视频在线看| 欧美巨乳在线观看| 免费av在线一区| 日本最新高清不卡中文字幕| 亚洲性av网站| 国产亚洲欧美日韩一区二区| 国产精品久久久久久一区二区| 欧美极品欧美精品欧美视频| 日韩在线观看免费| 亚洲国产成人精品一区二区| 欧美国产亚洲精品久久久8v| 久久国产精品网站| 亚洲天堂av在线免费观看| 欧美高跟鞋交xxxxhd| 亚洲精品福利在线观看| 岛国视频午夜一区免费在线观看| 久久久久久欧美| 久久久免费观看视频| 欧美日韩国产精品一区| 久久精品免费电影| 中文字幕精品在线视频| 亚洲精品在线不卡| 日韩的一区二区| 成人午夜在线观看| 欧美精品在线看| 亚洲国模精品一区| 国产精品久久久av久久久| 国产精品久久久精品| 国产91久久婷婷一区二区| 一本色道久久综合狠狠躁篇怎么玩| 国内精品在线一区| 亚洲18私人小影院| 国产一区二区美女视频| 国产精品免费观看在线| 日韩高清电影免费观看完整| 欧美二区在线播放| 久久夜色精品国产亚洲aⅴ| 欧美日韩色婷婷| 北条麻妃一区二区三区中文字幕| 在线看国产精品| 中文字幕欧美日韩| 欧美孕妇毛茸茸xxxx| 深夜福利日韩在线看| 国产日本欧美在线观看| 国产乱人伦真实精品视频| 社区色欧美激情 | 欧美限制级电影在线观看| 久久久久久久久久久人体| 伦理中文字幕亚洲| 日韩中文字幕不卡视频| 精品亚洲国产成av人片传媒| 欧美视频裸体精品| 亚洲精品一区二三区不卡| 亚洲精品第一国产综合精品| 欧美精品亚州精品| 欧美国产第二页| 亚州精品天堂中文字幕| 欧美激情视频在线免费观看 欧美视频免费一| 狠狠躁夜夜躁人人爽超碰91| 久久久av免费| 亚洲人成77777在线观看网| 日本欧美一二三区| 欧美黑人性生活视频| 国产在线精品自拍| 久久国产精品首页| 日韩高清av在线| 欧美黑人巨大精品一区二区| 欧美中文在线观看| 久久久久国产精品一区| 久久精品国产一区二区三区| 国产精欧美一区二区三区| 国产精品91在线观看| 欧美极品欧美精品欧美视频| 欧美色视频日本版| 久热99视频在线观看| 久久中文精品视频| 国产成人精品免高潮费视频| 中文国产成人精品| 国产91精品久久久久久| 国产午夜精品全部视频播放| 国产精品成人v| 国产又爽又黄的激情精品视频| 红桃av永久久久| 91精品国产综合久久男男| 久久五月情影视| 日韩中文字幕国产精品| 亚洲欧美综合图区| 色中色综合影院手机版在线观看| xvideos成人免费中文版| 福利微拍一区二区| 精品久久久久久中文字幕| 国产日韩欧美自拍| 欧美极品少妇全裸体| 久久视频在线播放| 国产日韩精品综合网站| 久久久99久久精品女同性| 中文字幕免费精品一区高清| 色久欧美在线视频观看| 久久福利视频导航| 欧美性一区二区三区| 日韩电影中文字幕在线观看| 日韩av在线免费观看| 亚洲国产精彩中文乱码av在线播放| 国产精品女人久久久久久| 国产精品久久网| 91极品视频在线| 国内免费精品永久在线视频| 久久激情视频免费观看| 国产精品日韩在线播放| 欧美综合激情网| zzjj国产精品一区二区| 久久久久久久一| 久久精品国产一区二区电影| 色999日韩欧美国产| 亚洲无限乱码一二三四麻| 亚洲成人免费在线视频| 国产精品久久久久久久久久ktv| 日韩亚洲欧美中文在线| 国产亚洲综合久久| 国产成人免费av| 97精品在线视频| 午夜剧场成人观在线视频免费观看| 欧美成在线观看| 麻豆精品精华液| 日韩视频精品在线| 91豆花精品一区| 国产精品免费久久久久影院| 日韩在线观看视频免费| 青青精品视频播放| 日韩在线视频免费观看高清中文| 欧美黄色免费网站| 日韩高清电影好看的电视剧电影| 国产精品久久久久久久美男| 日韩中文第一页| 国产91对白在线播放| 欧美性猛交xxxx富婆| 欧美成人在线免费| 91精品国产91久久久久| 日韩精品免费综合视频在线播放| 国产精品美女主播在线观看纯欲| 亚洲自拍偷拍区| 久久99精品久久久久久琪琪| 麻豆乱码国产一区二区三区| 欧美一级视频一区二区| 成人久久一区二区三区| 国产精品久久久久999| 亚洲aⅴ男人的天堂在线观看| 国产精品视频26uuu| 国产精品偷伦免费视频观看的| 中文字幕精品在线|