SEARCH

How-To Geek

How to Deny Access to Files or Folders in Windows Vista

This is a guest post by Abhishek Bhatnagar from www.technixupdate.com, a blog covering Computer tips and tricks.

Most of us use our computers in a shared in environment with our family members, friends etc. But sometimes we may want set some permissions so that we can actually restrict access to certain folders which do not lie in our My Documents, My Pictures etc.

In this case when you can restrict access to a particular folder which could be any where on your hard drive.

Set File or Folder Security

Right click on the folder which you want to block from other users and select Properties.

folder-properties 

Now click the Security tab in the folder properties window, and then click the Edit button.

folder-properties[3]

Click on the Add button to open the “Select Users or Group” window.

security-permissions

Now you can enter the username of the account for which you want restrict access in the text box (Use the “Check Names” button to validate)

  select-users 

or

if you are not sure about the username then click the Advanced button, which opens the search window.

search-users

To search all users click the Find Now button and then locate the user which you want restrict access to the folder and click OK. Now, you will see the username listed in the Security Permissions window, click on the username to select.

guest-blocked

Select the Deny Permissions for that user by checking the Deny box for Full Control.

deny-security-permissions

Now, you will be shown a Windows Security message which in short says that Deny entries always override the allow permissions. Click Yes, and then click OK.

windows-security 

In this way you have restricted access to the folder for a particular user (in my example it was a guest user account in Vista).

Tip: You can also restrict access to all the users in vista type Everyone as the username, but this will also include your account as it is also a part of Everyone user group.

Subscribe to More Computer Tips and Tricks like this from TechnixUpdate

Editor’s note: The files and folders within your user directory should already be off-limits to other regular users on your computer. Of course, if the other users are administrators, they can always reset any of these permissions, including deny. The main reason to use this technique would be if you are trying to remove access to folders on another drive, for instance hiding sensitive documents from children, etc. Just make sure those user accounts don’t have administrator access.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 07/10/08

Comments (27)

  1. abhishek

    Thanks for publishing it.

  2. Rohit Khurana

    Nice post!

  3. The Geek

    I definitely appreciate the contributed article… file permissions is something that I have not covered, but really should do more on.

  4. hrobky

    In Windows XP and above:
    To see the Security tab on the Properties window, you have to have the Simple File Sharing turned OFF… In any windows explorer window: tools -> folder options -> view -> Simple File Sharing

    In Vista:
    Press and release Alt key in windows explorer to see the menu

    In any windows Home edition:
    There is no way (tell me I’m wrong) to display Security tab. Use native command cacls (Change ACLs) or xcacls instead.

    I recommend to use powerful utility http://setacl.sourceforge.net/ to set the permissions (ACEs). Also sets ACL inheritance behavior. Able to set ACLs not just for files. (registry entries, services…) Advanced knowledge required.

  5. 0zSpitt

    thanks for finally being one of the few who actually help with vista. all the other forums who bash it have lost any credibility they probably never had to start with.

  6. The Geek

    @0zSpitt

    Thanks… our goal here is to be helpful whenever possible. You can also leave any help questions over on our forum, where we’ve got lots of people that answer questions.

    http://www.howtogeek.com/forum/

  7. Joel Thomas

    Great post Abhishek…Never thought of this as my computer is not usually shared.

  8. xiong

    thanks, i was just looking for this. good way to keep my por . . . pictures from prying eyes.

  9. Mike

    Thanks was trying to figure out how to do this a while ago

  10. John

    Finally a website that clearly explains this issue! Thanks, guys! Now I won’t have to be afraid anymore of guest account users viewing my gf’s (semi-)nude pics. ;-)

  11. Raj Kumar Arora

    Hi,

    This post was really helpful. But can u suggest any way by which we can restrict other Standard Users of Vista Machine to Rename, Write-in a new file, and Delete a folder and all this.

    Regards,
    Raj Kumar Arora
    Er_RajArora@yahoo.com

  12. Raj Kumar Arora

    In my last post the requirement is for steps that can do the whole task in once for whole drive/hard disk.

  13. Bijoy

    Hi,

    I managed to remove all users from the list of permission and now am not able to access it myself. Can someone please tell me how to revoke the changes or regain access?

  14. jd2066

    @Bijoy: To regain access go to Security, Advanced, Ownership and click Take Ownership to become the owner of the folder.

  15. Chava...

    Niiiiice… Thanks Much!.. I was having this problem but because I have a partition. Did not have it when I had just one drive =)

  16. Larry Miller

    Setting NTFS permissions can indeed be very useful. But be very sure you know what you are doing before doing this on an important file or folder. NTFS permissions is a complex topic and there are many implications that are far from obvious. Don’t even think about changing permissions on any system file or folder.

    Larry Miller
    Microsoft MCSA

  17. chevell

    That is just the problem, when you hit the so called “find all users” button it simply does not find all users in the network. This has been an ongoing problem with Windows 7 also. There is no way that all users in the network show up on that list, therefore it’s impossible to not share with them. It’s either Everyone or Nobody.

  18. shellie

    Thank you so much for posting this, I have been racking my brain trying to figure it out without screwing somthing up. This has helped soooo much. Thanks again.

  19. flora

    now i denied access to my folder and now can’t find it. i denied EVERYBODY and ADMINISTRATORS (stupid, i know) but i need it. it’s got school documents in there!! can i ever get it back?

  20. fero

    Windows security is pretty lame. Sure you can deny other users access to some folders and files, but what if there are more than 1 admins on that computer. The security in this case counts for nothing, any admin having access to absolutely everything.

  21. Abhinav

    Hi Frenz,

    I was trying to take the ownership of the denied folder,however, when I rite click on the properties of the folder it does not show me security tab on the window that opens up. If securtiy tab is not there, how can I access the folder and take the ownership.

    Can someone please help me

  22. prav

    @Abhinav

    First of all security tab will only show up in drives formatted with NTFS. If the drive is ntfs formatted, then go to explorer->Tools->Folder Options . In the view tab, go all the way down and uncheck “use simple file sharing”. Apply OK . Now you can see the security tab .

  23. quenne

    this helps me a lot from unauthorized access from the guest account … thank you so much

  24. james

    i know this works but i know theres another way to stop someone from opening a file at all and i know it was used in windows 95,98 and xp b ut i cant find it in windows 7 i know the some what know the name of it like edit it was called in windows xp where you can stop anyone who would just pop on to your computer and try to access your hard drive it was a built in program that came with windows and it has nothing to to do with typing a password to get in it cause you cant use a password it just simply no access at all and i hope you can help me with that so i can stop someone from accessing my harddrive

  25. Angela

    Thank you, this really helped. When I tried other websites for help, they all wanted me to pay a “fee” first! Thanks so much. Angela Arvada CO.

  26. Robinson RR

    How I do it if the folder is on a network drive?

  27. BG

    Thank you !

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!