"For Your Eyes Only": How to lock a file

Everything is a File

If you think Microsoft people consider file management one of the least glamorous parts of the Windows operating system, you'd be forgetting we get excited about some pretty geeky stuff. I, for one, get excited about understanding the basics of working with the file system, because whether you're writing a book, making a movie, or working on a spreadsheet, when you use a cool application, what you're really doing is creating or changing a file. And if you can't work with your files (and folders, for that matter) the way you want to, then the applications aren't quite as much fun to use.

To make sure it's not just me who finds working with files both fascinating (and occasionally frustrating, it’s true), I was looking through your feedback on articles we've written about file management. I discovered that many of you have a really good basic question: “How can you keep other people from changing your files?” The short answer is: You lock them up (the files, not the people).

How to Lock a File

Windows XP gives you the ability to specify who can read, change, or delete any of the files or folders you create. This means, for example, you can control which files your children can read, change, or delete. The feature you’ll use is called Access Control, which is a feature that's associated with every file or folder you create. The user interface for working with Access Control looks like this:

You begin by finding the file or folder you want to work with in Windows Explorer. (I usually do this by clicking on the My Documents icon on the Start Menu.) 

Note: Before working with Access Controls, you may need to change a setting for your file folders, and this quick tip tells you how to do it

After right-clicking on the file or folder name you want to protect, you'll use a dialog box like the one above to view and edit permissions for each person using your computer. (You see Groups in my example because this snapshot was taken on my work computer, and we're organized into groups here for security settings.) Anyway, basically you select the name of the person you want to set permissions for, then click on the check boxes to set the permissions he or she are allowed to have. In this example, I'm adding "write" permissions for Jason so he can play with my mom's picture in photo editing software. (Mom, if you're reading this, I'll tell you why later.)

So, there you have the really simple answer to the question about how to lock up your files. If that's all you were looking for, you can stop right here. But as you can guess from the screen shot above, there are a lot of different options for how to set up permissions, and if you'd like to explore these options, keep reading.

Get as Fancy as You Want!  

Though the tip above gives you the basics for locking people out of a file, you may be interested in learning more about this feature. Access Controls offer a lot of flexibility in how you manage who can access what files, in what ways. By tweaking the Access Control settings, you can, for example, let your son read any file in the “family history” folder, but only edit files that contain his own personal history. If you'd like more technical details about the different ways you can restrict access to your files, read this article. It's within the Using Security section of the Windows XP site, which in turn can lead you to ever-deeper levels of technical detail based on your needs and interests.

The refinement of the control set up is totally up to you. To save time and headaches, I recommend you take a top-down approach and set the permissions at the folder level first and, in necessary, individual files second. For example, if you want everyone who uses your computer to have the same settings, rather than protect each document in your family history folder, you can apply the controls to the entire folder. If you want to give your son access to family history files only, you can either set the access control on individual files or you could sort the files as two separate folders and only grant him access to his document folder. By the way, keep in mind that the Access Controls feature doesn’t just work on documents, you can use it the same way on your pictures, movies, or other files created using Windows XP.

Public Service Announcement 

Before I wrap up, I need to make a public service announcement for those of you considering setting up Access Controls on your work files. Before you begin, if you have an IT person who manages your computers, please check with him or her to make sure the controls you want to set don’t conflict with the security settings they’ve established for your business or organization.

The Access Control feature is one piece of the complementary set of security features provided by Windows XP. Understanding how all the security features work together can be helpful to you at home and at work, and our sister site, Microsoft At Home Security a great place to learn how all the technologies can be best used in your home or small business.

Security can be confusing, and we at Microsoft have been working for a long time to make this information easier to understand. And, not to toot our own horn too much, I think the At Home Security team has done a great job. In fact, I used the site to help my husband update our home PC this morning. And for the first time in years, I felt as though I had a clear and logical path to follow to get the system protected.

So, I realize I took what seemed like a simple question on a slightly lengthy journey to and beyond the answer. Feel free to add a comment if you have additional suggestions for ways you keep your files secure, or more questions about how to use the Access Control feature in Windows XP.

Robbin Young