There are many things to love about Windows 7. It truly is “Vista done right”, sad as that may be. But it ain’t perfect.
One of the most common problems, as I recently discovered, is that you tell Win 7 to share only your Public directories, but it doesn’t quite listen. Due to some apparent bug that is at least present in the Release Candidate build of Win 7, sometimes the OS will share your entire Users directory, which includes your Public files/folders. That means ALL your files are shown to the whole world on your LAN – not just the your public folders.
Fortunately, it’s pretty easy to fix this little problem once you know a few little bits of information…
I know, I know – you shouldn’t have to dig into the guts of file sharing and permissions. It should “just work”. Well, don’t feel bad. Try sharing some directories with the whole world on a Mac or Linux box without a password, and you will quickly find yourself delving into the horrors of Samba config files. At least Win 7 doesn’t make you do that sort of frustrating crapola. Count your blessings.
Anyhow, here’s how Windows 7 shares stuff: There is a Users directory, typically C:\Users. Under this Users directory is the directory for your user account, which we’ll say is C:\Users\Scottie. Then there is also another subfolder for publicly-shared directories: C:\Users\Public. Pretty easy, right?
Normally, yes. But sometimes, when you use the Win 7 GUI – the “Network and Sharing Center” – your C:\Users\Public folder is shared, AND your entire C:\Users\Scottie folder (“Scottie” will be different in your case) will also be shared, much to your dismay. Nevertheless, Windows will still tell you via the GUI that only your Public folders are shared. Oops.
You might think that you can simply right-click the Users folder, look at the Sharing tab, and just sort things out quickly and easily. Unfortunately, it isn’t quite so simple. In Windows 7, file sharing depends on two things: the file sharing settings, and the folder’s permissions.
So, if you want to keep your Public shared, but hide the files under your personal Users directory, here’s how to do it…
Step 1 is to hide the entire C:\Users directory:
- Open Explorer and right-click on the C:\Users folder and select Properties.
- Click the Sharing tab, and then click the Advanced Sharing button (NOT the “Share…” button!!)
- Click the Permissions button, select “Everyone”, and then clear the checkboxes for “Full Control”, “Change”, and “Read”.
- Click OK, and then clear the “Share this folder” check box in the Advanced Sharing window.
- Click OK, and then close the Properties window
At this point, you will have successfully unshared the entire Users directory, including the Public dir and all its subdirectories. You can verify this by connecting to your computer from another machine on the LAN.
Okeydokey. Now, if you want to make your Public dir show up again, just do the following:
- Open Explorer and go to C:\Users.
- Right-click on the Public folder and select Properties.
- Click the Sharing tab, and then click the Advanced Sharing button (again, NOT the “Share…” button!)
- Click “Share this folder” and give it a Share Name of “Public”
- Click the Permissions button, select “Everyone”, and then make sure to check the boxes for “Full Control”, “Change”, and “Read”. If you only want people to be able to read the files in your Public dirs, just check “Read”.
- Click OK, OK, and the close the Properties window.
You’re done! Note that when you share/unshare folders, you’ll probably have to wait a moment or two while the permissions on all the files and folders are changed. In any case, you can now go once again to another computer on your local network and verify that only your Public folder is shared.
This little trick is also useful if you’d like to set up file sharing the way it worked in Vista. In Vista, when only your public was shared, it would show up on the network as: \\Scottie\Public
In Windows 7, Microsoft for some reason decided it would be more fun to confuse everyone by changing the network path to: \\Scottie\Users\Public
Because, ya know, confusing changes like that always help everyone!
But, no worries – you can now make 7 work like Vista, and anyone on your LAN with your drives mapped will actually see your files again instead of an error when you upgrade from Vista to 7.