I used this guide on itsfoss.com to share a folder on my Ubuntu 20.04 laptop. I then followed the guide on to try and access this folder on the Windows machine, yielding a "You do not have permission to access the folder. Contact the network administrator to request access"-message.
If I just go to \\ in the Windows explorer I can actually see the shared folder, but I get the same message when I doubleclick it.
I only used the first part of the tutorial, titled "Method 1. Share folders on local network without password". So I haven’t done anything samba-related.
And I know that there are a lot of similar questions with the answer "you need to install samba", but according to the guide on itsfoss.com, that shouldn’t be necessary.
Is that guide incomplete, or is my Ubuntu-laptop misconfigured?
EDIT: Output from net usershare info --long
$ net usershare info --long
[Acer]
path=/media/steen/Acer
comment=
usershare_acl=Everyone:R,Unix User\steen:F,
guest_ok=y
And the rights on that path are drwxrwxrwx.
EDIT: Detailed procedure:
- I opened Nautilus
- I located the folder Acer in /media/steen/
- I right clicked the folder and chose "Local network share"
- In the dialog, I clicked "Share this folder" and "Guest access"
- I clicked "Create share"
- On the Windows machine, I opened Explorer and entered "\192.168.0.32" in the address bar
- I was then shown a shared folder with the name "Acer".
- I doubleclicked the folder and got the error message.
>Solution :
The problem isn’t samba. It’s Linux permissions on the /media/steen folder. It only allows the user steen to traverse the /media/steen folder to get to what is mounted under it. This is by design.
Fastest way out of this is to:
** Edit /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add this one:
force user = steen
** Save the file then restart samba:
sudo service smbd restart