Score:0

I used a simple guide to share one of my folders on the local network, but I can't access it from a Windows machine

ru flag

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:

  1. I opened Nautilus
  2. I located the folder Acer in /media/steen/
  3. I right clicked the folder and chose "Local network share"
  4. In the dialog, I clicked "Share this folder" and "Guest access"
  5. I clicked "Create share"
  6. On the Windows machine, I opened Explorer and entered "\192.168.0.32" in the address bar
  7. I was then shown a shared folder with the name "Acer".
  8. I doubleclicked the folder and got the error message.
Morbius1 avatar
es flag
Please edit your original post and add the output of the following command: `net usershare info --long`
waltinator avatar
it flag
Telling us which remote procedure (RP) you "followed" doesn't help us help you for N reasons: 1) It's remote. Will the link exist tomorrow? 2) Reading the RP doesn't tell us how accurately you "followed" it. Did you suffer typos or missed lines? We have. 3) Reading the RP omits the error messages you got on your system. These error messages (and the commands that caused them) are key elements in any diagnosis.
OZ1SEJ avatar
ru flag
I have updated the original post.
Score:1
es flag

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
OZ1SEJ avatar
ru flag
Wow - that worked! Thanks! :-)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.