Denied access to network drive

Robin S 6 Reputation points
2022-10-18T11:39:07.773+00:00

After each restart I get an "Access is denied" when connecting to the network drive (see screenshot below).

I noticed after restarting the LanmanWorkstation-service I can enter the network drive straight away without reentering my credentials. It looks like it has something to do with the LanmanWorkstation-service or related dependencies.

I have two SMB network drives located on a NAS. One drive is username/password protected the other has public access. The "public" network drive continues working. The credentials are correct.

I've enabled SMB 1.0/CIFS File Sharing Support support manually. I'm aware SMB 1.0 support is deprecated because of vulnerability. I'm in a private network. Network discovery and file and printer sharing is on. I'm running Windows 11 Education (Build 22621.674).

What I've tried:

  • deleting the credentials in credential manager;
  • removed all network drives in command prompt by typing: "net use * /d /y";
  • recreating the credentials and network drives; and of course
  • rebooting all devices several times.

Any advice is welcome. Thank you.

251577-screenshot.png

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,477 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Limitless Technology 44,021 Reputation points
    2022-10-19T22:03:56.873+00:00

    Hello there,

    Do you have any firewall like McAfee Anti-Virus monitoring software on the device?

    If so try to disable them and see if that helps temporarily. The error message mostly occurs if you do not have sufficient permissions set to access the network drive or you have enabled “password protected” sharing.

    First, make sure the “password protected” sharing is turned off on the computer.

    1. Open Network and Sharing Center by clicking the Start button, clicking Control Panel, clicking Network and Internet, and then clicking Network and Sharing Center.
    2. Under Sharing and Discovery, click the arrow button next to Password-protected sharing.
    3. Click Turn off password-protected sharing, and then click Apply. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

    ----------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

  2. Robin S 6 Reputation points
    2022-10-28T10:33:30.207+00:00

    Thank you @Limitless Technology

    I've Norton360 on my pc. I've temporarily disabled the firewall like you suggested. I've also turned off password-protected sharing. Unfortunately, the problem still persists.

    I'm sure I've sufficient permissions and the credentials are correct. Like I mentioned earlier when I restart the Workstation (Lanmanworkstation)-service the error message disappears, and I can access the network drive.

    Everything worked fine for 3 years. Until I had to do a clean install because I left the Windows Insider Program.

    If you have any other suggestions, please tell me. Thank you!

    0 comments No comments

  3. Robin S 6 Reputation points
    2022-10-29T19:30:29.973+00:00

    @Limitless Technology

    I gave it another try and discovered something.
    The problem occurs when I connect to the second network drive, the network drive with public access.

    I have two network shares: with and without public access. One network share needs credentials and the other one doesn't.

    When I connect to the network drive and enter the credentials everything works fine. Even when I restart my PC several times, everything keeps working fine.
    However, when I connect to the network drive with public access. At first everything works fine but when I restart my PC, I get the error message "Access is denied" mentioned in my previous posts.

    What I did are the following steps:

    • Disconnected the Network Drives
    • Removed the Credentials for the network drive in Credential Manager
    • Turned off the Windows Features: SMB 1.0/CIFS and SMB Direct
    • Turned on the above-mentioned Windows Features
    • Connected to the network drive without public access
    • Entering credentials
    • Restarting several times (no error message)
    • Connected to the network drive with public access
    • Restart (error message)

    Somehow the network drives and the way they're accessed gets mixed up. Maybe I forget something? Please help me out. Thank you!

    0 comments No comments

  4. Robin S 6 Reputation points
    2022-10-29T22:26:07.343+00:00

    @Limitless Technology

    I've tried several possible solutions. For now, one solution seems to work.

    For each mapped network drive, I created a REG_DWORD value 1 with the key name "ProviderFlags" under the key HKCU\Network in the registry.

    In the Register under:

    HKEY_CURRENT_USER\Network

    For each "drive letter" I created a new DWORD(32) with the key name:

    ProviderFlags

    With the value data:

    1

    I'm not sure what this does and why it works but it works for me.

    More information about ProviderFlags setting: http://gary-nebbett.blogspot.com/2021/06/mapped-network-drive-reconnection.html

    0 comments No comments