Select the product you need help with
כיצד להשתמש ב- Xcacls.vbs כדי לשנות הרשאות NTFSמספר מאמר: 825751 - הצג מוצרים שמאמר זה מתייחס אליהם. בעמוד זהתקצירקיימת גירסה מעודכנת של הכלי Extended Change Access Control List ?(Xcacls.exe) הזמין כקובץ script של Microsoft Visual Basic ?(Xcacls.vbs) של Microsoft. מאמר זה מתאר, שלב אחר שלב, כיצד להשתמש בקובץ ה- script ?Xcacls.vbs כדי לשנות ולהציג הרשאות של מערכת הקבצים NTFS file עבור קבצים או עבור תיקיות.
באפשרותך להשתמש בפקודה Xcacls.vbs משורת הפקודה כדי להגדיר את כל אפשרויות האבטחה של מערכת הקבצים הנגישות בסייר Microsoft Windows. Xcacls.vbs מציג ומשנה את רשימות בקרת הגישה (ACL) של הקבצים. הערה Xcacls.vbs תואם רק ל- Microsoft Windows 2000?, Microsoft Windows XP ו- Microsoft Windows Server 2003?. Xcacls.vbs אינו נתמך על-ידי Microsoft. הגדרת הפקודה 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.) הערות: - 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 Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. 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). חלק מהמילים אינן שלמות בחלון הפקודה. הפלט גם מציג את גירסת קובץ ה- script, ספריית ההפעלה והארגומנטים שהיו בשימוש. באפשרותך גם להשתמש בתווים כלליים כדי להציג קבצים תואמים תחת הספריה. לדוגמה, אם תקליד את הפקודה הבאה, כל הקבצים בעלי סיומת ?".log" שנמצאים בתיקיה C:\Test folder מוצגים: 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"פקודה זו משנה את הבעלים של הקובץ Readme.txt כך שהקבוצה MachineA\Group1 תהיה הבעלים. xcacls.vbs c:\test\badcode.exe /r "machinea\group1" /r "domain\testuser1"פקודה זו מבטלת את ההרשאות ל- C:\Test\Badcode.exe עבור MachineA\Group1 ועבור Domain\TestUser1. xcacls.vbs c:\test\subdir1 /i enable /qפקודה זו מפעילה העברה בירושה בתיקיה C:\Test\Subdir1. היא מעלימה את הפלט מהמסך. xcacls.vbs \\servera\sharez\testpage.htm /p "domain\group2":14פקודה זו מתחברת מרחוק אל ?\\ServerA\ShareZ באמצעות Windows Management Instrumentation ?(WMI). לאחר מכן הפקודה מקבלת את הנתיב המקומי עבור מיקום משותף זה, ותחת הנתיב, היא משנה את ההרשאות ב- 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 Knowledge Base:
318754
(http://support.microsoft.com/kb/318754/
)
כיצד להשתמש ב- Xcacls.exe כדי לשנות הרשאות NTFS (ייתכן שקישור זה מפנה לתוכן שחלק ממנו או כולו מופיע באנגלית)
מאפייניםמספר מאמר: 825751 - סקירה אחרונה: שבת 29 דצמבר 2007 - עדכון: 2.4 המידע במאמר זה חל על:
| תרגומי מאמרים
|


לראש הדף








