I've created a directory named "Shared" in my "My Documents" directory (C:\Users\Cory.MYDOMAIN\Documents\Shared). I right clicked on the Shared folder and publicly shared this one directory. At least that's what wanted to do. In reality, Windows 7 shared the entire C:\Users directory.

How can I share this one subdirectory without granting access to the rest of the C:\Users tree?

Edit: Thanks to MarkM, I now have shared only what I wanted to share. In case this trips up anybody else, I'm adding this edit to reveal what I learned while resolving this:

Right clicking on the folder and sharing with the "Share with" option is different than right clicking, opening the properties, and using the Sharing / Advanced Sharing option.

You can prevent this from accidentally happening again by turning off the sharing wizard. Open Folder Options in the control panel, click the view tab, then scroll down and uncheck "Use Sharing Wizard (Recommended)".

1 Answer
1

You should just right click on the folder that you want to share and set the appropriate share and NTFS permissions. This should only share that folder. If you are sharing your whole Users directory, then you did something wrong.

Note that any users that you want to share that directory to need "Traverse Directory" at minimum in the NTFS permissions to all parent directories or they will get access denied when trying to get to the share.

Edit: Works no problem for me. Are you right clicking on the folder, selecting properties, going to the "sharing" tab and doing advanced sharing?

It's a little tough to see in this screen shot, but the bottom line of the command prompt is the output of net share showing only that nested directory being shared.

Do you have Windows 7? If so, please try it and let me know if it works for you. When I do as you suggest then look at my shares in the computer management tool, I see C:\Users has been shared. It appears like you cannot share a deeply nested file or folder without sharing everything in the parent folder (recursively). At least I can't figure out how to do it.
–
CoryRMay 17 '10 at 19:50

@CoryR - See my edit. Also, what version of Win7 are you using?
–
MDMarraMay 17 '10 at 19:57

I'm using the 64-bit version. I just did exactly as you said and it worked! Thanks. Previously I was right clicking on my shared folder then selecting "Share with" and picking specific people. This resulted in the entire C:\Users tree being shared. This seems terribly broken to me.
–
CoryRMay 17 '10 at 20:05

@CoryR - Got ya! Glad it worked, you can accept this as the correct answer by clicking the check mark underneath the down arrow at the top of my question.
–
MDMarraMay 17 '10 at 20:09