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

问题描述 投票:0回答:1

我有一个在C:\Windows\system32\drivers\etc\host文件夹文件权限的问题。它没有让我访问该文件夹,但我改变了对属性的文件夹权限,以便我现在可以访问该文件。但我不希望手动访问文件。我有一个计划,我希望让该程序访问编辑或修改的文件。我所做的一切我可以,但仍然不能让hosts文件程序访问。

这是对我的“等”文件夹中当前的权限:

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

这同样适用于该文件夹中的“hosts”文件。我也试图设置文件的所有者和文件夹都以我的用户名和“所有应用程序包”。仍然得到同样的错误。我还要提到的是,当我尝试带来的“等”文件夹的完全控制权“CREATOR OWNER”我得到这个错误:

C:\Windows\system32\drivers\etc\hosts.ics无法枚举容器对象:应用安全信息时发生错误。访问被拒绝

这是当我运行程序作为管理员,我得到的错误:

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

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

我用lockhunter解锁“等”文件夹,但我仍然得到这个错误。我以前是没有这个问题,它只是今天发生了。我禁用卡巴斯基互联网安全套装,Windows Defender和防火墙,当我试图使用的应用程序。

这里是充满细节的文字:

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.
windows-8.1 permission-denied
1个回答
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键。 (与文件夹的路径替换)。

即然后,键入“ICACLS /准许管理员:F / T”不带引号和回车。 (与文件夹的路径替换)。

© www.soinside.com 2019 - 2024. All rights reserved.