Windows 8.1中主机文件上的文件/文件夹权限错误

时间:2015-03-22 20:27:17

标签: windows-8.1 permission-denied

我在C:\Windows\system32\drivers\etc\host文件夹中遇到文件权限问题。它没有让我访问该文件夹,但我更改了属性的文件夹权限,以便我现在可以访问该文件。但我不想手动访问该文件。我有一个程序,我想让该程序访问该文件进行编辑或修改。我尽我所能,但仍然不能让该程序访问主机文件。

这是我"等等的当前权限。文件夹:

Trustinstaller: full control
Users: full control
Administrator: full control
Mm (my username): full control
SYSTEM: full control
CREATOR OWNER: special permissions
ALL APPLICATION PACKAGES: full control

这同样适用于"主机"该文件夹中的文件。我还尝试将文件和文件夹的所有者设置为我的用户名和"所有应用程序包"。仍然得到同样的错误。我还应该提一下,当我试图完全控制"等等#34;文件夹到" CREATOR OWNER"我收到这个错误:

  

将安全信息应用于:   C:\Windows\system32\drivers\etc\hosts.ics   无法枚举容器中的对象。访问被拒绝

这是我以管理员身份运行程序时遇到的错误:

  

您的应用程序中发生了未处理的异常。如果单击“继续”,应用程序将忽略此错误并尝试继续。如果单击退出,应用程序将立即关闭。

拒绝访问路径C:\Windows\system32\drivers\etc\hosts

我已经使用lockhunter来解锁"等等#34;文件夹,但我仍然得到错误。 之前我没有遇到过这个问题,它刚刚发生在今天。我在尝试使用该应用程序时禁用了卡巴斯基互联网安全,Windows防御者和防火墙。

这是完整的详细信息:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path 'C:\Windows\system32\drivers\etc\hosts' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.StreamWriter..ctor(String path)
   at Hotspot_Shield_Elite_Universal_Crack.Form1.Button3_Click_1(Object sender, EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Hotspot Shield Elite Universal Crack
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Mm/Desktop/Hotspot%20Shield%20Elite%20Universal%20Crack.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 12.0.20806.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34243 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

1 个答案:

答案 0 :(得分:0)

我在“命令行”中找到了一个可解决此问题的链接。

https://answers.microsoft.com/en-us/windows/forum/windows_8-networking/failed-to-enumerate-objects-in-the-container-when/6e886d51-96fa-44b8-b687-3cf4fab619c2

在下面粘贴以避免死链接综合征

您将以管理员身份以“您”身份运行以下命令。...但这将使您能够授予其他帐户的权限

c。在结果中,右键单击“命令提示符”,然后单击“以管理员身份运行”。

d。在命令提示符下,键入“ takeown / f / r / d y”(不带引号),然后按Enter。 (替换为文件夹的路径。)

e。然后,键入不带引号的“ icacls / grant administrators:F / T”,然后按Enter。 (替换为文件夹的路径。)