In Windows XP, there were several ways to share a folder, and it has always been a little confusing to work with NTFS permissions and shared permissions. Now in Windows 7, this is even more confusing! Yes, that’s because they now have homegroups and you can share files with the homegroup, which is separate from sharing with the rest of the world.
In any case, if you managed to share a folder, and then one day decide to delete it, you may have noticed a strange lock icon on the folder that you previously shared. It looks like this:
It annoyed me a lot because there was no such problem in Windows XP before and I didn’t even know what the lock icon meant. All I want to do is delete the share, not lock the folder. After some reading, I found out that when you share a folder in Windows 7, the folder no longer inherits permissions from the parent folder and that’s why the lock icon appears. I find this very confusing and I definitely couldn’t figure it out on my own!
Before I get into how to reset folder permissions to make the lock icon disappear, let me first tell you what it looks like. If you don’t care, you can just navigate to the “Remove Lock Icon from Folder” heading. If you right-click on a folder, you will see the Share with Who option:
If you select Homegroup (Read) or Homegroup (Read / Write), then your folder will automatically be available only within the homegroup. Now the problem arises when trying to get rid of the share. There is no way to just delete a share! Instead, you need to select “Nobody,” which as seen by the icon adds a big, bold lock icon to the folder.
Another way to share is to right-click the folder and go to Properties. If you go to the Sharing tab, you will see two options: Sharing network files and folders and Advanced Sharing.
Clicking the Share button at the top is a lot like selecting Specific People when selecting Share in the screenshot above.
You can enter a name or select “Everyone” or “Homegroup”. Again, there is no way to delete a share. You just need to remove people or groups from the list below. Again, as soon as you do this, a lock icon will appear.
The last option is to select Advanced Sharing from the Sharing tab – the only method that won’t give you a padlock icon. Click Advanced Sharing, and then check the Share this folder box.
Now if you exit and return to the same dialog and uncheck the box, the lock icon will not appear over the folder! Hooray! So if you don’t want to bother with the lock icon at all, you should share the folder using Advanced Sharing. Anyway, if you already have a lock icon, how do you get rid of it?
Remove the lock icon from the folder
Now, to get the permissions back to the state they were before sharing the folder, you need to right-click the folder and select Properties. Then you need to go to the Security tab. Yes, the Security tab, not the Sharing tab.
Then you need to click the Advanced button and click Change Permissions.
Then you need to check the Include inheritable permissions from parent checkbox.
Then you need to click OK three times to return to the main explorer interface. You will notice that the lock icon on the folder has disappeared. However, you are not finished yet. Now you need to go back to the same dialog again – right-click, select Properties, go to the Security tab, click Advanced and click Change Permissions. Now you need to remove everything that has a value in the “Inherited From” column.
Select the line and click the Delete button. Get rid of only those lines that are not inherited from those listed. That’s all. Your folder will now have the normal permissions it had before you shared it, and the lock icon will disappear! Quite a cumbersome process, but it’s Windows! Enjoy!