How do I give permission to a folder in Windows 10 using CMD?

UPDATE While I was able to use the method described in accepted answer once it failed a second time or was just giving too much trouble.

Searching further I found SetACL by Helge Klein which is far far superior and does exactly what is needed.


I cannot access certain folders e.g. c:\Program Files\WindowsApps. Via command line I get an error of "Access is denied" and via Windows Explorer I get a pop up a dialog box stating "You don't currently have permission to access this folder"

How do I give permission to a folder in Windows 10 using CMD?

Clicking on Continue gives me access, but I would like to grant myself access using the command line; so that my scripts do not run into this problem running under the same security context.

I found this question on Microsoft Technet but I couldn't get it to work. Note that I am already running Powershell as administrator.

PS C:\WINDOWS\system32> icacls "C:\Program Files\WindowsApps" /grant i063510:F /inheritance:e
C:\Program Files\WindowsApps: Access is denied.
Successfully processed 0 files; Failed processing 1 files
PS C:\WINDOWS\system32> icacls "C:\Program Files" /grant i063510:F /inheritance:e
C:\Program Files: Access is denied.
Successfully processed 0 files; Failed processing 1 files

If it matters, I am using Windows 10 upgraded from Windows 8.1.

How do I give permission to a folder in Windows 10 using CMD?

You may need to share your pc with many people for a variety of reasons. Windows 10 offers and manages all file permissions at the system level. It keeps your data protected from other users. In Windows 10 PC, files created by users are by default readily accessible. You can change file permissions Windows 10, if you are an administrator which will restrict other users to editing only their files. The permissions of files can be changed easily. In this article, we bring to you a helpful guide that will teach you how to change file permissions in Windows 10.

How do I give permission to a folder in Windows 10 using CMD?

Contents

  • How to Change File Permissions in Windows 10
  • Are File Permissions and File Attributes Different?
  • Things to Keep in Mind
  • Method 1: Edit User Profile in Folder Security Properties
  • Method 2: Replace All Child Object Permission Entries
  • Method 3: Add a New Administrator Profile
  • Method 4: Change Ownership to Administrator

In Windows 10, you may experience the file permission issue in the following scenarios:

  • When other users have specified permissions for files that you are not allowed to view on a shared PC.
  • You want to change the system files although editing system files is not recommended as it results in unexpected problems.
  • Protected data you downloaded from a USB or external which you wish to change in your PC.
  • You wish to make changes in files that have been transferred from other operating systems like macOS.
  • You wish to remove other users’ authorization to prevent them from viewing particular shared files.

Are File Permissions and File Attributes Different?

It is important to understand the difference between file permission and attributes before learning how to change file permissions Windows 10.

  • File attributes – They are properties of a file. For instance, if it is read-only or not. Attributes remain the same even if the file is copied, uploaded, downloaded or mailed. Usually, attributes do not require admin rights to modify.
  • File permissions – They are normally exclusive to a PC i.e. the permissions may change if the file is opened in another PC. They control who can access the files and their content.

Things to Keep in Mind

Before we can get down to how you can change permissions Windows 10, you should know the level of user rights required by you to change file permissions in Windows 10.

  • System files and folders: You need administrator user rights to change file permissions.
  • User files: You require admin privileges or credentials to the user’s Windows account.
  • TrustedInstaller owned files: To make modifications to a file or folder controlled by TrustedInstaller, admin user rights are necessary.

Method 1: Edit User Profile in Folder Security Properties

This method applies to all users. Generally, handling files and folders that you own is not a problem. However, people have reported being unable to alter files they own or have created. After logging in with the right user account, follow these steps to modify file permissions on Windows 10.

1. Open File Explorer by pressing Win + E keys simultaneously.

2. Navigate to the file whose permissions you wish to alter.

3. Right-click on it and select Properties from the context menu.

How do I give permission to a folder in Windows 10 using CMD?

4. Switch to Security tab and Click on Edit.

How do I give permission to a folder in Windows 10 using CMD?

You can inspect and alter permissions for each listed user or group in the following window.

5. Choose a user or a group.

6. For each user, you may get different permissions. For example, if Full control checkbox is checked under the Deny column then the selected user will be unable to open the file.

How do I give permission to a folder in Windows 10 using CMD?

7. You will see the follow options:

  • Full control – File can be read, written, changed or deleted by user.
  • Modify – File can be read, written and changed by user.
  • Read & execute – File can be read or run the selected file.
  • List folder contents – File can be viewed in the selected folder.
  • Read – File can be opened by user.
  • Write – File can be edited or created by user.

Check the permissions boxes as per your requirement. Click Apply > OK.

How do I give permission to a folder in Windows 10 using CMD?

Also Read: Fix File Explorer Not Responding in Windows 10

Method 2: Replace All Child Object Permission Entries

In some cases, permission can’t be changed. The permissions under Allow column are grayed out and can’t be selected. You can change that by going to Advanced settings, here is how to do it.

1. Follow Steps 1,2 and 3 from Method 1 to open the Folder Properties.

2. Go to Security tab and Click on Advanced.

How do I give permission to a folder in Windows 10 using CMD?

3. Check the box that says, Replace all child object permission entries with inheritable permission entries from this object and select your account as the user.

How do I give permission to a folder in Windows 10 using CMD?

4. Click the Apply. After that a confirmation prompt will appear, click Yes on it.

How do I give permission to a folder in Windows 10 using CMD?

You should be able to view and change permissions of the selected folder or files and understand how to change file permissions in windows 10.

Method 3: Add a New Administrator Profile

Sometimes a user is not mentioned at all in the users or groups box. You must manually add the user in that scenario before you can grant them permission. Otherwise, they will be unable to access the files as they are not on the user list. Follow these steps to add a user and allow them file permissions to Word or Windows 10 in general:.

1. Right-click folder/file you want to share and select Properties from the menu.

How do I give permission to a folder in Windows 10 using CMD?

2. Switch to Security tab and Select Edit.

How do I give permission to a folder in Windows 10 using CMD?

3. Click on Add.

How do I give permission to a folder in Windows 10 using CMD?

4. In the Enter the object name to select box of the prompt window, type the user name to whom you want to grant access. Click on Check Names. It will automatically select the username and verify it. Click OK.

How do I give permission to a folder in Windows 10 using CMD?

5. The username will now appear in the security tab under Group or user names.

6. Select the user name and grant them permission as preferred. Click Apply > OK.

Also Read: How to Force Delete File in Windows 10

Method 4: Change Ownership to Administrator

You can easily change permissions of a file by taking its ownership. It is the simplest way to modify a file. Follow the below instructions to get complete control of a file by taking ownership of it.

Option I: Change Ownership from Advanced Security Setting

1. Follow Steps 1 and 2 from Method 2 to go to Advanced Security Settings.

2. Click on Change next to the Owner section at the top of the page.

How do I give permission to a folder in Windows 10 using CMD?

3. A popup window will appear. Enter your username in the Enter the object name to select. Select Check Names and wait until it is verified. Click OK to save changes.

How do I give permission to a folder in Windows 10 using CMD?

4. The owner section will be updated now. To save changes, check Replace owner on sub containers and objects, then click Apply and OK.

How do I give permission to a folder in Windows 10 using CMD?

Note: You could check the option to Replace all child object permission entries as advised by some experts.

Option II: Manually Provide File Permissions

In rare cases, you may be required to manually provide access to file permissions to your account. To do so, simply follow these steps:

1. Navigate to Advanced Security Settings.

2. There will be a list of all users shown. Click the Add button if your user account isn’t displayed.

How do I give permission to a folder in Windows 10 using CMD?

3. Click Select a principal.

How do I give permission to a folder in Windows 10 using CMD?

4. Now put your user account name into the prompt box as shown in Step 3 of Method 4.

How do I give permission to a folder in Windows 10 using CMD?

5. Select Full control. In Type select Allow and In Applies to select This Folder, Subfolders, and Files. Click OK.

How do I give permission to a folder in Windows 10 using CMD?

Now you have full access to the selected file.

Also Read: How to Open a Pages File on Windows 10

Option III: Through Command Prompt

If you still can’t take ownership of a file then you can use Command Prompt which will directly modify the file properties. Here is how to change file permissions in Windows 10 using Command Prompt.

1. Hit the Windows key, type Command Prompt and click on Run as Administrator.

How do I give permission to a folder in Windows 10 using CMD?

2. Type the following command and press Enter key.

takeown /f path_to_folder /r /d y 

Note: Replace path_to_folder with the path of folder/file you want to take ownership of.

How do I give permission to a folder in Windows 10 using CMD?

3. Now type the following command and Enter key.

icacls path_to_folder /grant administrators:F /T 

Note: Replace administrators with your account/user name.

How do I give permission to a folder in Windows 10 using CMD?

You should now have complete access to the selected folder/file after performing these two commands.

Frequently Asked Questions (FAQs)

Q. In Windows 10, what are permissions?

Ans: Permissions for apps allow them to access certain components of your device, such as hardware, such as GPS to establish your location or software, such as the camera. It’s critical to understand which programs use which permissions.

Recommended:

  • Fix Zoom Unable to Connect Error Code 5003
  • Fix No Sound in Firefox on Windows 10
  • How to Download, Install, and Use WGET for Windows 10
  • 28 Best File Copy Software for Windows

We hope that this guide was helpful and you were able to learn how to change file permissions in Windows 10. Let us know which method worked for you the best. If you have any queries or suggestions then feel free to drop them in the comments section.

How do I fix permission is denied in CMD?

Start a Command Prompt as Administrator by right-clicking on the "Command Prompt" icon in the Windows Start Menu and choose "Run as administrator". Click Continue if you are presented with a confirmation popup message box. In the new command prompt, enter "net user administrator /active:yes".

How do I give permission to a folder in Windows 10?

It is a simple process to grant access to specific users for any folder you have created..
Access the Properties dialog box..
Select the Security tab..
Click Edit. ... .
Click Add... ... .
In the Enter the object names to select text box, type the name of the user or group that will have access to the folder (e.g., 2125. ... .
Click OK..

How do I check folder permissions in CMD?

Or to get the info of all files and folder inside that directory: PS C:\Users\Username> Dir | Get-Acl Directory: C:\Users\Username Path Owner Access ---- ----- ------ . anaconda Owner Name NT AUTHORITY\SYSTEM Allow FullControl... . android Owner Name NT AUTHORITY\SYSTEM Allow FullControl... .

How do I change permissions in Windows 10 from command line?

Here is how to change file permissions in Windows 10 using Command Prompt..
Hit the Windows key, type Command Prompt and click on Run as Administrator..
Type the following command and press Enter key. takeown /f path_to_folder /r /d y. ... .
Now type the following command and Enter key..