In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article complements the commonly used methods of seizing power or owners of files and folders, involving the usage of Takeown, Cacls, and Icacls.
Takeown / f file name
Obtain the ownership of the file
Takeown / f / r / d n folder
Get the ownership of the entire folder and its underlying subdirectory files
Takeown / f * / a / r / d y
Force the owner of all files, folders and subfolders under the current directory to be changed to the administrators group (administrators)
Cacls d:\ file1\ *. / T / G administrators:F
Modify the NTFS permissions of all files and subfolders under the d:\ file1 directory to be fully controlled by only the administrator group (administrators) (delete the original NTFS permission settings)
Cacls d:\ file1\ *. / T / E / G administrators:F
Add administrators group (administrators) full control permissions to the NTFS permissions of files and subfolders under the original d:\ file1 directory (do not delete the original NTFS permission settings):
Icacls c:\ windows\ * / save AclFile / T
Save the ACL of all files in c:\ windows and its subdirectories to AclFile.
Icacls c:\ windows\ / restore AclFile
The ACL of all files in AclFile that exist in c:\ windows and its subdirectories will be restored.
Icacls file / grant Administrator: (DMAE WDAC)
The user is granted administrator rights to delete and write to the DAC.
Icacls file / grant * S Mel 1-1-0: (DMagne WDAC)
Users defined by sid S Mel 1-1-0 will be granted permission to delete files and write to DAC.
C:\ Windows\ system32 > takeown /? TAKEOWN [/ S system [/ U username [/ P [password] / F filename [/ A] [/ R [/ D prompt]] describes that the tool allows administrators to reacquire access to files that were previously denied access by reassigning file ownership. Parameter list: / S system specifies the remote system to connect to. / U [domain\] user specifies the user context in which the command executes. / P [password] specifies the password for a given user context. If omitted, prompt for input. / F filename specifies the file name or directory name pattern. You can specify the mode with the wildcard "*". Allow shared name\ file name. / A gives ownership to the administrators group, not to the current user. / R Recursion: indicates that the tool runs on files in the specified directory and subdirectory. / D prompt the default answer is used when the current user does not have "list folders" permission in a directory. This occurs when a recursive (/ R) operation is performed in a subdirectory. Take ownership with a valid value of "Y" or skip with "N". / SKIPSL does not follow symbolic links. Applies to / R only. /? This help message is displayed. Note: 1) if / An is not specified, file ownership will be granted to the currently logged-in user. 2) "?" is not supported. Mixed mode with "*". 3) / D is used to suppress the confirmation prompt. Example: TAKEOWN /? TAKEOWN / F lostfile TAKEOWN / F\\ system\ share\ lostfile / A TAKEOWN / F directory / R / D N TAKEOWN / F directory / R / F TAKEOWN / F * TAKEOWN / F C:\ Windows\ System32\ acme.exe TAKEOWN / F% windir%\ * .txt TAKEOWN / S system / F MyShare\ Acme*.doc TAKEOWN / S system / U user / F MyShare\ MyBinary.dll TAKEOWN / S system / U domain\ user / P password / F share\ filename TAKEOWN / S system / U User / P password / F Doc\ Report.doc / A TAKEOWN / S system / U user / P password / F Myshare\ * TAKEOWN / S system / U user / P password / F Home\ Logon / R TAKEOWN / S system / U user / P password / F Myshare\ directory / R / A
C:\ Windows\ system32 > cacls /? Note: Cacls is not recommended, please use Icacls. Display or modify the file's access control list (ACL) CACLS filename [/ T] [/ M] [/ L] [/ S [: SDDL]] [/ E] [/ C] [/ G user:perm] [/ R user [...]] [/ P user:perm [...]] [/ D user [...]] Filename displays ACL. / T changes the ACL of the files specified in the current directory and all its subdirectories. / L changes the ACL / S of the volume mounted to the directory to display the SDDL string of DACL against the target processing symbolic link itself. / S:SDDL replaces ACL with the ACL specified in the SDDL string. (invalid / E, / G, / R, / P, or / D). / E Edit the ACL without replacing it. / C continues when an access denial error occurs. / G user:perm grants access to the specified user. The Perm can be: r read W write C change (write) F full Control / R user revoke access to the specified user (legal only when used with / E). / P user:perm replaces the access rights of the specified user. The Perm can be: n without R read W write C change (write) F full Control / D user denies access to the specified user. You can use wildcards to specify multiple files in the command. You can also specify multiple users in the command. Abbreviation: CI-Container inheritance. ACE is inherited by the directory. OI-object inheritance. The ACE is inherited by the file. IO-inherits only. ACE does not apply to the current file / directory. ID-inherited. ACE inherits from the ACL of the parent directory.
Welcome to the official account of Wechat: Xiao Wen study Society.
C:\ Windows\ system32 > icacls /? ICACLS name / save aclfile [/ T] [/ C] [/ L] [/ Q] stores the DACL of files and folders that match names in aclfile for future use with / restore. Note that the SACL, owner, or integrity label is not saved. ICACLS directory [/ substitute SidOld SidNew [...]] / restore aclfile [/ C] [/ L] [/ Q] applies the stored DACL to the files in the directory. ICACLS name / setowner user [/ T] [/ C] [/ L] [/ Q] changes the owner of all matching names. This option does not force all identities to be changed; you can do so using the takeown.exe utility. ICACLS name / findsid Sid [/ T] [/ C] [/ L] [/ Q] looks for all matching names that contain ACL that explicitly mentions SID. ICACLS name / verify [/ T] [/ C] [/ L] [/ Q] finds all files whose ACL is irregular or whose length is inconsistent with the ACE count. ICACLS name / reset [/ T] [/ C] [/ L] [/ Q] replaces ACL with the default inherited ACL for all matching files. ICACLS name [/ grant [: r] Sid:perm [...] [/ deny Sid:perm [...]] [/ remove [: G |: d]] Sid [...] [/ T] [/ C] [/ L] [/ Q] [/ setintegritylevel Level:policy [...]] / grant [: r] Sid:perm grants access to the specified user. If you use: r, these permissions replace all previously granted explicit permissions. If you do not use: r, these permissions are added to all previously granted explicit permissions. / deny Sid:perm explicitly denies the specified user access. An explicit deny ACE is added for the listed permissions, and the same permissions are removed from all explicitly granted permissions. / remove [: [g | d]] Sid deletes all SID that appear in the ACL. Using: G, all permissions granted to the SID will be deleted. Using: d, all permissions that deny the SID will be deleted. The / setintegritylevel [(CI) (OI)] level explicitly adds the integrity ACE to all matching files. The level to be specified is one of the following: the inheritance option for L [ow] M [edium] H [igh] integrity ACE can take precedence over the level, but applies only to directories. / inheritance:e | d | r e-enable inheritance d-disable inheritance and copy ACE r-delete all inherited ACE Note: Sid can be in numeric format or friendly name format. If the number format is given, add a * at the beginning of the SID. / T indicates that this operation is performed on all matching files / directories under the directory specified by that name. / C indicates that this operation will continue on all file errors. An error message will still be displayed. / L indicates that this operation is performed on the symbolic link itself rather than on its destination. / Q indicates that icacls should disable the display of success messages. ICACLS preserves the canonical order of ACE entries: explicitly deny explicitly deny inheritance grant perm is the permission mask One of two formats can be specified: simple permission sequence: n-No access F-full access M-modify RX-read and execute R-read-only W-write-only permission D-specific list of permissions separated by commas in parentheses: DE-delete RC-read control WDAC-write DAC WO-write owner S-synchronous AS-access system security Universal MA-maximum allowed GR-generic read GW-generic write GE-generic execution GA-all generic RD-read data / list directory WD-write data / add Add file AD-add data / add subdirectory REA-read extended attribute WEA-write extended attribute X-execute / traverse DC-delete subkey RA-read attribute WA-write attribute Inherited permissions can take precedence over each format But only apply to directories: (OI)-object inheritance (CI)-Container inheritance (IO)-inheritance only (NP)-inheritance not propagated (I)-permissions inherited from the parent container
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.