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. Show
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. 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.
If it matters, I am using Windows 10 upgraded from Windows 8.1. 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. Contents
In Windows 10, you may experience the file permission issue in the following scenarios:
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.
Things to Keep in MindBefore 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.
Method 1: Edit User Profile in Folder Security PropertiesThis 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. 4. Switch to Security tab and Click on Edit. 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. 7. You will see the follow options:
Check the permissions boxes as per your requirement. Click Apply > OK. Also Read: Fix File Explorer Not Responding in Windows 10 Method 2: Replace All Child Object Permission EntriesIn 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. 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. 4. Click the Apply. After that a confirmation prompt will appear, click Yes on it. 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 ProfileSometimes 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. 2. Switch to Security tab and Select Edit. 3. Click on Add. 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. 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 AdministratorYou 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. 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. 4. The owner section will be updated now. To save changes, check Replace owner on sub containers and objects, then click Apply and OK. 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. 3. Click Select a principal. 4. Now put your user account name into the prompt box as shown in Step 3 of Method 4. 5. Select Full control. In Type select Allow and In Applies to select This Folder, Subfolders, and Files. Click OK. 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. 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. 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. 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:
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.. |