You do not have permission to access \\PC. Contact your network administrator to request access
File Explorer says: “You do not have permission to access \\PC. Contact your network administrator to request access.” With net use the same problem is System error 5 has occurred. Access is denied.
The other PC was found and you signed in, but the account you used may not open that folder. On a home network, “network administrator” means you.
What it means
Section titled “What it means”Error 5 is ERROR_ACCESS_DENIED. It is a permission problem, not a network problem.
A shared folder on Windows has two sets of permissions:
- Share permissions, set in Advanced Sharing, Permissions. They apply only to people who come in over the network.
- Folder (NTFS) permissions, set on the Security tab. They apply to everyone, on the PC and over the network.
Microsoft says Windows looks at both and applies the more restrictive one. So both must allow at least Read for your account.
Why it happens
Section titled “Why it happens”- The share permissions do not list your account, or list it with Deny.
- The share allows you, but the Security tab does not. A folder inside another user’s profile (for example
C:\Users\Anna\Videos) does not let other accounts read it. - You signed in with a different account than you think. Windows keeps one sign-in per PC, so an older connection can still be in use. See system error 1219.
- You were let in as a guest, and guests have no rights on that folder.
How Devpit fixes or avoids it
Section titled “How Devpit fixes or avoids it”Share Files sets both permissions for you, and only as much as needed. It creates a temporary login for the share, shares the folder with Read for that login only, and gives that login read access to the folder and everything inside it. Then it reads back the share’s access list and stops if anyone other than that login has access. When you stop sharing it removes the share, the folder permission and the login.
If Windows still says access is denied on the receiving PC, Devpit shows “Access denied” and tells you to start the share again on the sharing PC.
The manual fix
Section titled “The manual fix”Do this on the PC that shares the folder.
1. Check the share permissions
Section titled “1. Check the share permissions”- Right-click the folder, choose Properties, then the Sharing tab.
- Click Advanced Sharing. Make sure Share this folder is ticked.
- Click Permissions.
- Click Add, type the user name the other PC signs in with, and click OK.
- Select that user and tick Allow for Read. Tick Change too only if the other PC must write files.
- Click OK twice.
2. Check the folder permissions
Section titled “2. Check the folder permissions”- In the same Properties window, open the Security tab and click Edit.
- Click Add, type the same user name, and click OK.
- Tick Allow for Read & execute (this also ticks List folder contents and Read).
- Click OK twice.
Microsoft’s File Explorer guide shows the same two places with Everyone and Full Control. That works, but it lets anyone who can sign in change and delete the files. Giving Read to one account is enough to copy files.
3. Sign in again on the other PC
Section titled “3. Sign in again on the other PC”- On the PC that receives, run
net use * /deletein Command Prompt to drop old connections. - Open the share again and sign in with that user name and password.
- If it now says the password is wrong, see system error 1326.
If the message talks about unauthenticated guest access instead, see guest access blocked.
Sources
Section titled “Sources”- Microsoft: Can’t access shared folders from File Explorer (“You do not have permission to access”)
- Microsoft: Managing permissions for shared folders (the more restrictive permission applies)
- Microsoft: System error codes 0 to 499 (ERROR_ACCESS_DENIED, 5)
- Microsoft: New-SmbShare (ReadAccess)
- Microsoft: icacls
Common questions
I shared the folder with Everyone. Why is access still denied?
A shared folder has two sets of permissions: the share permissions and the folder's own security permissions on the Security tab. Windows applies the more restrictive of the two. Sharing with Everyone opens only the first one, so check the Security tab too.
Is error 5 a wrong password?
No. With a wrong password you get system error 1326. Error 5, Access is denied, means you signed in, but that account may not open the folder.
Do I need Full Control for Everyone?
No. To copy files from a share, Read is enough. Give Read to the one account that needs it. Full Control lets that account change permissions and take ownership, so give it only when you mean to.
