Ubuntu Local Network Share - Failed to mount Windows share: Permission denied

14,187

The two most common causes of your error message are:

[1] You are not passing the samba password when asked for the "registered user" credentials.

You create that password by adding the user to the samba password database - and I will use my own as an example:

sudo smbpasswd -a morbius

[2] Since the share that was created allows guest access the more likely case is the path to the shared directory does not allow access to the shared folder. The shared folder itself may allow access to guest but the path to that folder may not. For example if the folder is mounted to /media/morbius/Media then only morbius will have access to Media.

I would suggest that you edit your original question and add to it the output of the following command so the folks here can see where the folder is located:

net usershare info --long
Share:
14,187

Related videos on Youtube

Matthew Layton
Author by

Matthew Layton

Passionate about programming, technology and DLT.

Updated on September 18, 2022

Comments

  • Matthew Layton
    Matthew Layton over 1 year

    I've just set up a home server running Ubuntu 19.04 with a dedicated hard drive for file sharing (Ubuntu is installed on a separate drive). Both drives are formatted with ext4.

    On the dedicated hard drive I've created a share, which looks like this...

    share

    On my workstation I can see the share listed. I've tried to access it using both Anonymous and Registered User methods...

    login

    ...but no such luck...

    denied

    Any ideas?

  • Matthew Layton
    Matthew Layton over 4 years
    Setting the password helped. I can probably live without guest access for the time being
  • Sun Bear
    Sun Bear about 3 years
    You wrote "For example if the folder is mounted to /media/morbius/Media then only morbius will have access to Media." If this path is causing the problem, may I know what is the right path to use so that all users can access the folder?
  • Saurin Dashadia
    Saurin Dashadia about 3 years
    @SunBear please check this link. This will help you: forums.linuxmint.com/viewtopic.php?t=190021
  • EoghanM
    EoghanM over 2 years
    This is crazy; so you can happily 'share' any folder on the network and grant anonymous access, but it'll only work if you also recursively check permissions on parent folders?? So you either have to create a folder somewhere at root level (which you don't have permission to do) or grant anonymous access to your /home/user folder? (I read that forum link and it wasn't very helpful)
  • Morbius1
    Morbius1 over 2 years
    A given user needs to be able to "traverse" the parent folders to get to the shared folder. True locally on the same system or across the network for a samba share. This has always been the case in Linux. In your example the user does not need access to the entire home folder but he does need to be able to "traverse" the /home/user folder to get the the shared folder. If you want to share the /home/user/Public folder you need to: chmod o+x /home/user. Or use a "force user" or other settings in samba to achieve the same result.