One of the first few things you might encounter after upgrading your existing Windows to Windows 8.1 is the file and folder/directory permission problem. If you have multiple disk drive, as well as multiple users or a new user for the new Windows 8.1, then you might have some of the folders become inaccessible due to the lake of permission after the system was upgraded to Windows 8.1.

You might get a warning message like the following “You don’t currently have permission to access this folder.” Click Continue to permanently get access to this folder.

You don't currently have permission to access this folder

You don’t currently have permission to access this folder

You have the choice to click “Continue”. In most case, this will fix the issue of not being able to get access to the folder. But sometimes, you might still run into issues where all the child folders have the same problem, unable to access this folder because of the lack of permission. In this case, you can manually click “Continue” for every single child directory or use a command line utility called “takeown” to achieve this.

takeown command

takeown /a /r /d Y /f D:\PATH\

Launch command prompt as administrator. You can do so in Windows 8.1, by right click on the Start Menu > Command Prompt (Admin) and type the following command. Let me explain what this command is doing, /a is telling the computer to grant ownership to the administrator /r recursively find all folders and sub-folders and files. /d Y is to answer yes to any prompt if needed, /f specific root folder you’d like to start on.

By doing so you will see messages fly by on each success permission update, “SUCCESS: The file (or folder): “…” now owned by the administrator group. You are now successfully silently updated file permission to the new system.

Success takeowner

Mission of taking folder ownership succeeded

If you don’t want to grant the permission to administrator group, just drop /a in the command and it will grant permission to the current user. This will save you tons time on file permission headaches when upgrade your system to a new OS, particularly after Windows 8.1 upgrade.

 

Want to reset NTFS permissions from the command line? Use this syntax:

icacls "c:\users\jshipp\*" /q /c /t /reset

This is the same as using the GUI command:

 Replace all child object permissions with inheritable permissions from this object

  • Win7: Replace all child object permissions with inheritable permissions from this object
  • WinXP: Replace permission entries on all child objects with entries shown here that apply to child objects

Warning: If you leave out the \* then the jshipp folder will have the same permissions as the users folder, which is not what the GUI does, and probably not what you want, but it's nice to know it's possible.