DIY

How do I... Change access permissions for all folders and files in Vista?


This blog post is also available in PDF form as a TechRepublic download.

In a previous How do I... blog post, TechRepublic published the steps one would take to change permissions on a single file in the Microsoft Windows Vista operating system. TechRepublic member rignatius@... asked in the ensuing discussion thread if we could enlighten him on how to apply the permission changes to all of the subfolders and files in the hierarchy of a particular folder. The basic procedure is the same, but there are a few more check boxes to look at during the process. But once those checks are inserted or removed, depending on the situation, the permission changes will be propagated to all of the files and folders below the folder being acted upon. For this How do I..., I created a hierarchical set of folders: Test1, Test2, and Test3. But only Test3 had any files in it (Figure A).

Figure A

Example folder hierarchy
Figure B shows that the permissions for Test1 are set to Full Control.

Figure B

Full access on Test1
However, one of the files in Test3 has permissions set to deny access (Figure C).

Figure C

Denied access all around

To change the settings for that one file, we could just right-click the file, click the Security tab, and edit the permissions as we did in the previous How do I... blog post. But what if we had hundreds of files in our example folder hierarchy? That would be a lot of clicking.

To change the access settings in Windows Vista for the current folder and all of the folders and files that flow from it in the hierarchy, you follow the same procedure, only with a twist or two in the guise of check boxes. Right-click the folder (Test1) and click the Security tab and then click the Advanced button to get to the screen shown in Figure D.

Figure D

Advanced Security Settings for Test1
We are going to change the settings for the entire system, so click on the SYSTEM entry and click edit to get to the screen shown in Figure E.

Figure E

More advanced settings for Test1
This is where we designate that the change in permissions we are about to make should "replace the existing inheritable permissions on all descendants with inheritable permissions from this object." We do this by clicking the check box and then clicking the Edit button to get to the screen shown in Figure F.

Figure F

Permission settings for Test1
As you can see, the Test1 permissions are set to Full Control allowed; we just have to pass those settings down the line. When you click OK on the screen in Figure F and then Figure E, you will get to the security dialog box shown in Figure G. Click Yes and then OK for the rest of the settings boxes.

Figure G

Replacing permissions, are you sure?
Now, when we drill down the hierarchy to reach Test3, right-click the file we looked at in Figure C, and click Properties, you see that the permissions are set to allow Full Control. (Figure H)

Figure H

Full Control is regained

About

Mark Kaelin is a CBS Interactive Senior Editor for TechRepublic. He is the host for the Microsoft Windows and Office blog, the Google in the Enterprise blog, the Five Apps blog and the Big Data Analytics blog.

14 comments
ziyagill
ziyagill

i have a software which only works with qq games china not with qq games india means ibibo..........i try a lot to do things in my favour but cant succeed...it only works whn i open a pool table frm qq china...qq china n ibibo r very similer just the difference is languge.........plz help me how can i edit tht software or give any kind of permission to work with ibibo games alos........plzzzzzzzzzzz.....dying to need help frm ur side

ClaudioVT
ClaudioVT

Old post , but hope you still answer this: How do i ADD one user to all folders and subfolders without changing actual security permissions? You see, I have Thousands of folders and files in one network storage and since was open to Everyone, they just changed permissions and now even Administrator account cannot open/change these folders/files. And backup fails. So how can I add a user (ex:backupADM) with full control to all that without changing actual security permissions? Really hope you can save me. Thanks in advance.

rebeth
rebeth

Forgive me if this has been asked and answered but I simply want to be able to do anything at anytime with any folder and never be told I need permission to perform an action. I am the sole user and sole administrator on this box. How do I fix it so as the one and only user and administrator I am never denied access to anything on this box? Vista Home Premium. Rick in Tacoma

shaesewn
shaesewn

on my instructors website she posted a quiz for us to print out but somehow my settings have been changed to powerpoint viewer only and the quiz is a pdf file so it wont let me open it how can i change it back

billabongboy
billabongboy

How do I change permissions to keys in the registry? I'm trying to install a program that is being affected by my lack of control over a certain key in the registry and when I try to gain full access (after adding usernames and checking the full control boxes) it still says I don't have sufficient permissions. This is really aggravating seeing as how I am the only one that uses my computer. Is there any way to bypass all permissions or turn them off? If not, how can I gain full control over my computer? THANKS!

ArcherII
ArcherII

I think the issue you neglected to identify, which is reflected in the result, is that all explicitly applied permissions are removed from objects down the hierarchy and replaced with inherited permissions only. It's obvious from your examples that you did not have inheritance turned off for the test file but merely applied explicit permissions to the file which will override the inherited permissions by default. Inheritance is turned on for those files where it may have been turned off originally and will now receive all inherited permissions from the parent object, not just the permissions you may have set for one security group or account. In fact, the choice to check the box for ???replace the existing inheritable permissions on all descendants with inheritable permissions from this object.??? will forceably remove all explicit permissions on all child objects while enabling inheritance, if necessary, on all child objects.

Gonzalo@Sisap
Gonzalo@Sisap

Hi, this procedure is really useful, since we already had experienced the problem. We have an installer for a vba application running on Excel, and we face trouble with it, because the folder permissions have to be modified. Is there a way to set permissions at the installation? cheers

SkySharkDude
SkySharkDude

Let's say I have a folder that has 10 sub-folders and 30 files in it and I want to change the permissions for 5 folders and 15 of the files only. The Security tab seems to disappear when you select multiple folders or files.

chookieeee
chookieeee

Havent tried it on vista, but on Windows Server 2008 beta 3, i cant change any permission on a file stored in the root folder of the harddisk (eg. C:\ ), but i can in any other folder. You can do it in win server 2003. Anyone know about this??

jocelyn.pasqualini
jocelyn.pasqualini

In order to get a usb device to re-enumerate, I used to delete the corresponding VidPid from the Usb folder in The Registry and reconnect it afterwards. On Vista it seems that the only way to acheive this is to change the Permissions Settings for all sub keys one after the next as more keep appearing as I go along although I have full admin rights. This obviously takes far too long and I am desperately looking for a solution. Cheers

JoeKool24601
JoeKool24601

It's beta 3, so it's likely that you have found a bug. I'd report it to Microsoft.

Mark W. Kaelin
Mark W. Kaelin

Could you elaborate on this problem for us. I am not following what you are trying to accomplish. Thanks.

jocelyn.pasqualini
jocelyn.pasqualini

First let me thank you for your reply. I am undoing enumeration of a USB device.Pre-Vista all I used to do (if the device did not enumerate properly either not loading the drivers or Windows failing to identify which device it was) I used to open the Registry Editor, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB find the entry (Vid_Pid) corresponding to the device and delete it then just reconnect it.With Vista however, things are different.First I have to take ownership of the Key but then when I try to "cascade" permissions I am told I am not allowed to do that although I have full control and all permissions are ticked. The reason for this behaviour is that Windows has now created sub-keys which I have to take ownership of before I can delete them but then again more sub-keys appear and I have to wait until the last one shows up to eventually be able to rermove the Vid-Pid folder which is time consuming and not viable when troubleshooting usb issues with end users. Cheers

Mark W. Kaelin
Mark W. Kaelin

Editing the registry seems to be a very complicated approach. Would a utility like this work better: http://www.nirsoft.net/utils/usb_devices_view.html USBDeview allows you to unplug or uninstall USB devices. It is freeware and it can work remotely - might be just the thing you are looking for. Works with Windows versions past 2000, even Vista. Let us know if that helps you.