Secure a folder or file in Windows XP with permissions and encryption
Takeaway: There are often folders and files on your hard drive that should be secure from prying eyes. Microsoft Windows XP Professional has several basic built-in features that make securing data simple.
If you have an explanation or a quick fix that would make a good SolutionBase article, we invite you to submit your solution using this form.
Problem
Not all data is meant to be shared. Often you'll want to prevent information from being seen by just anyone. Microsoft Windows XP Professional provides several features for securing data. Although the methods are basic in nature, they'll be more than enough deterrent for all but the most determined hacker.
Protecting data from certain users is the situation OptionExplicit faced when he asked for help in TechRepublic's Discussion Center.
How do I secure a folder/directory from being accessed by unauthorized people (from Windows explorer), but at the same time, give access to some programs that need to access that same directory or the files in it? The programs that will routinely access the folders are written in VB.
Solution 1
Windows XP Professional allows you to set permissions for a file or folder from the properties dialog, which you can reach by right-clicking the file or folder and clicking the Properties entry on the ensuing menu. In the Properties dialog, click the Security tab to get to an interface similar to that shown in Figure A.
Figure A |
![]() |
| Security tab |
From this interface, you can add users to the Permissions list, set specific permissions for each user or group, and grant special permissions via the Advanced button. Setting permissions and policies can seem a little daunting, but the basic principles are easy to understand: User A can access this folder and User B cannot. The numerous possible permission combinations should give you the flexibility to meet your security needs.
Visual Basic
Because OptionExplicit is using Visual Basic for his project, he will most likely have to add some code from the FileIOPermission class to check permissions for each user as he or she accesses the folder in question.
Solution 2
Another method for securing a folder or file involves encryption, which is also part of Windows XP Professional. Similar to permissions, the encryption configuration is reached by right-clicking the folder or file and then clicking the Advanced button on the ensuing Properties interface. The Advanced button brings you to a dialog similar to the one shown in Figure B.
Figure B |
![]() |
| Encryption |
You can encrypt the file or folder by clicking the encryption check box. Keep in mind that no encryption scheme is completely crack-proof. Physical security—preventing access altogether—is really the most secure security.
| Next Steps: Build your skills with these hand-picked resources |
Print/View all Posts Comments on this article
SponsoredWhite Papers, Webcasts, and Downloads
- The Shortcut Guide to Managing Disk Fragmentation - Chapter 1 Diskeeper
- How File Fragmentation Occurs on Windows XP / Windows Server 2003 Diskeeper
- Voice over IP Reliability: Architecture Matters ShoreTel
- Virtualization and Disk Performance Diskeeper
- Microsoft SQL Server 2005: Deployment and Tests in an iSCSI SAN Dell EqualLogic
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET


