Access Denied for localstorage in IE10

前端 未结 8 739
灰色年华
灰色年华 2020-12-01 02:38

Yesterday I installed Windows 8 and am now trying to understand why I am getting an \"Access Denied\" message when accessing localstorage. The page is being served on the sa

8条回答
  •  青春惊慌失措
    2020-12-01 03:22

    In addition to the already excellent answers here, I'd like to add another observation. In my case, the NTFS permissions on the Windows %LOCALAPPDATA% directory structure were somehow broken.

    To diagnose this issue. I created a new Windows account (profile), which worked fine with the localStorage,so then I painstakingly traversed the respective %LOCALAPPDATA%\Microsoft\Internet Explorer trees looking for discrepancies.

    I found this gem:

    C:\Users\User\AppData\Local\Microsoft>icacls "Internet Explorer"
    Internet Explorer Everyone:(F)
    

    I have NO idea how the permissions were set wide open!

    Worse, all of the subdirectories has all permissions off. No wonder the DOMStore was inaccessible!

    The working permissions from the other account were:

     NT AUTHORITY\SYSTEM:(OI)(CI)(F)
     BUILTIN\Administrators:(OI)(CI)(F)
     my-pc\test:(OI)(CI)(F)
    

    Which matched the permissions of the parent directory.

    So, in a fit of laziness, I fixed the problem by having all directories "Internet Explorer" and under inherit the permissions. The RIGHT thing to do would be to manually apply each permission and not rely on the inherit function. But one thing to check is the NTFS permissions of %LOCALAPPDATA%\Microsoft\Internet Explorer if you experience this issue. If DOMStore has broken permissions, all attempts to access localStorage will be met with Access Denied.

提交回复
热议问题