The takeown command was denied access

he he 21 Reputation points
2021-06-11T03:47:00.727+00:00

我在administraotr用户下对system32中的一个系统文件 x.dll 使用命令
takeown /f x.dll
结果居然显示访问拒绝?
其他所有系统文件都可以更改权限,把owner改为“administrator”,只有这个文件的owner是 “...”
求解


Translated from Chinese to English:

I used the command
takeown /f x
.dll under the administraotr user to show access denial for a system file x.dll in system 32?
All other system files can change permissions to "administrator" and only
the file's owner is "..." solve

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,908 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Carl Fan 6,846 Reputation points
    2021-06-14T09:29:16.403+00:00

    你好,
    如果用icacls命令来更改权限是否可以。
    icacls "full path of folder or drive" /setowner "Administrators" /T /C
    我想有时它只是不让您更改权限,可能因为一些进程正在使用该文件,或者如果您试图编辑一个文件夹的属性,那么一个进程有一个文件在该目录或子目录中打开。
    或者是这个文件本身所属的文件夹权限您需要先赋予,并更改了继承权限后,才可以更改文件夹中的文件权限。
    或者您可以尝试使用一下process monitor这个工具,看一下更改文件权限的过程,过程中访问那些注册表或者文件夹的时候出现access deny,导致这个文件无法更改。
    如果回答是有帮助的, 请将其标记为答案, 可以帮助其他有相同问题的社区成员, 并快速找到有用的答复。

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.