Windows File Share - Cannot access shared folder
Windows File Share - Can't access shared folder
Windows File Share - Making a reliable file share
Issue:
Trying to map a drive to another computer in the home network fails with a "Cannot access shared folder", or you are prompted for a user-id/password that should work, but doesn't.
For years, I've had troubles making a reliable Windows share connection with the computers in my local network. It seems to sometimes work, sometimes not. More typically, it would start to work after an initial failure. These steps make for a more reliable network.
For this discussion, assume two computers: A desktop and a laptop (any two computers)
Prerequisites:
- Both computers must have password-enabled Windows accounts (logins)
- The remote computer must be powered-on, but does not have to be logged in to a user-account. The remote computer can be on a screen saver (but not asleep). The remote computer can have all users "logged-out."
- Both computers must be on the same physical network (home network)
- Both computers (should be) in the same Windows Workgroup (untested for this article; assumed they are in the same Workgroup), and it is helpful if both have a friendly name.
Consider renaming each PC to a friendly name.
Some PC's come from the factory with a name like "W3b29411a" -- feel free to change. The name should be relatively short, no spaces.
In the same panel, make the two machine's Workgroup name the same.
In this example, "Wolfhouse"
![]() |
Click for larger view |
Microsoft is confused in this area. The settings that need to be changed are scattered in various control panels, and where these settings are is incoherent.
I am unhappy with the steps in this section because some of the settings can only be run while logged in as an administrator -- and there does not seem to be a way to promote a non-administrative account with enough rights to do this. This means temporarily making that user an administrator, make the change, and return them to normal rights.
In [Network & Internet] (left-nav)
In center list, choose "Ethernet"
Confirm both computers are marked (*) Private Network
Note: Try these steps and if you succeed, your account is an administrator-level account (which it should not be; see end of this article for a thought on this.) Only Administrators can see these menus. There is not a way to promote a non-admin user, giving enough rights to run this step. If you attempt, but see "Ask and administrator to change..." -- your account does not have rights. See directly below.
In Settings (the gear icon)
Select left-nav "Network and Internet"
Select "Advanced Sharing Settings"
In Private Networks:
[x] Turn on "Network Discovery"
[x] Turn on "Set up network connected devices automatically"
[x] Turn on "File and Printer Sharing"
Leave Public Networks turned off
In "All Networks", many articles recommend turning off 'Password Protected Sharing'. I do not recommend this.
2a. Alternately: *If* your local account does not have administrator rights, log that user out of the windows desktop, and login as the Administrator account to make the changes, or run these two commands from an elevated command prompt:
From the Non-Admin account, Start, Run, "CMD" (run-as Administrator)
From the DOS command Prompt, type these commands, all on one line:
netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes
- Look for "updated 62 rule(s)"
netsha advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
- Look for "updated 46 rule(s)"
Services:
3. On each workstation in the network (regardless of the user logged into that workstation):
- Click the Start Button and immediately begin typing the work "Services"
- When offered, select "Services" (Services.msc) - choose "Run as Administrator"
3a. In the list of services, locate these six services:
"Function Discovery Provider Host" (illustrated)
"Function Discovery Resource Publication" (illustrated)
Network List Service
"SSDP Discovery"
"UPnP Device Host"
3b. For each service, change the Startup Type from (Manual) to "Automatic (Delayed Start)"
Why are these services not set to auto-start when Sharing is turned on? No clue. Some of these auto-start *after* a first network share attempt; some do not. By having these services always running at machine-boot, network sharing becomes reliable.
Building the Share:
Microsoft calls common folders a "Share" -- where one computer can open a folder on another and can write and update files.
In this example, the desktop computer is named "Oscar" and the laptop is named "MaryLeno". The desktop is trying to reach the laptop's drive. Assume a folder on a laptop's C: drive, named "C:\Data"
The goal: Make this folder 'openable' from the desktop with these steps.
On the Laptop
A. Using File Explorer, locate the "C:\Data" folder (any folder).
Highlight the folder on the "detail side"
It is helpful if this folder is 'higher-up' in the directory tree, saving from having to build lots of shares for lower folders. Permissions are set at this level and flow down, through all subfolders. Typically, "Everyone" (full-control) rights are granted.
If a folder needs to be "ReadOnly", with different rights than another Share, it needs to have its own Share Name and cannot live within an upper-share. This may force building a whole series of other shares, or it may force you to move the ReadOnly Share to another location on the hard disk.
Be leery about sharing the entire "C:\Users\<you>\Documents" (myDocuments) folder. You might consider making a sub-folder, such as "...\Documents\Public". "Documents" is more sensitive, with more secret stuff, than would be found in a normal data folder.
B. On the highlighted folder, right-click,
Choose "Properties"
Click "Share"
C. In the text box, type "Everyone" (Add)
When prompted, choose "ReadWrite"
"Everyone" does not mean everyone in the world. This is limited to your network. Full Control (see illustration below) seems to be a requirement to update files. Peer-to-Peer network sharing in Windows has always been a little wonky.
D. On OK, you are prompted: "Your folder is shared"; Click "Done" (you are not really done...)
Although the Share is built, Windows picked the sharename, based on the folder name and if the folder name had spaces, it will cause troubles later.
There can be as many "named shares" on a computer as desired. You can share USB drives, D: drives, CD drives, or individual folders. I typically name my shares "data". It could be called "myData", "theSharedDrive", "TaxFiles", etc..
Continue with the next step!
E. Review or Change the Share name:
From the Properties panel (near the Share button)
Click "Advanced Sharing"
- Note the [x] checkbox: Share this folder
- Review the Share name; if necessary, change to a shorter name
- For example, if the folder name was "Some Random Folder" -- the sharename would be the same. Consider renaming the share to "mySharedFolder"
Click "Permissions"
Select "Everyone" -- confirm "Full Control"
Close all dialogs
Using the Share:
Windows Sharing is screwy. If the destination Share's user-account is a local administrator's account, the share from, say, the desktop to the laptop will work, as shown next. Type the computer's name, backslash, and the share's name, along with the administrator's credentials, and you will be logged in.
If the remote computer's account is a non-admin account (a "loser account" -- highly recommended), or the account was formerly an administrator, but is now demoted to a standard account, the share will not work with that user-ID, even if that non-administrative account built the share!
*In other words, the remote computer can only be mapped with the Administrator's login-credentials!
On the plus side, the remote computer does not need to be logged in with either the Administrator or the original share. The only thing needed is the machine be turned on -- and not asleep. Just login with the admin's credentials.
The Share's name is the computer's name + the share name:
\\MaryLeno\Data
where "\\" indicates a server name -- the laptop's name is "\\MaryLeno"
(or from other thoughts: \\MaryLeno\Public)
If a similar share was built on the desktop computer, it could have been called:
\\Oscar\Data or
\\Oscar\myRandomFolder
In this example, the share was made on the Laptop.
From the Desktop, access that drive (that Share) by:
a. From the desktop, launch File Explorer
b. On File Explorer's top address line (the path area), type
"\\MaryLeno\Data" (no quotes, where "data" is the Laptop's Share name, as defined above)
c. You may be prompted for credentials.
Use the login name from the remote computer's point-of-view -- the user's name on the remote computer.
and the same password that user uses to unlock the PC when it first boots
To find which user name to use: On the Laptop, Start, Run, "CMD" (a DOS prompt). Note the path name. (There are other ways of finding this name, such as typing "whoami")
To find the computer's name:
or at the CMD / DOS Prompt, type "Whoami", seeing the computer name: Oscar\trayw
Possible Problems:
The (remote) computer does not appear in File Explorer's "Network"
Possible solutions:
- A share was not built
- The "Network Discovery" settings were not set (step 2, above)
Possible Problem:
The login credentials do not work -- but they should. You know the user-id and password is right and you know that UserID has an actual login (and profile) on that workstation.
Solution 1: It appears you must use an Administrator's credentials to login to the Share.
Possible Problem:
I don't want to give away my admin credentials.
Does not seem much hope here; you could create a new account, such as "ShareUser" -- but it would have to be admin in order to present the share.