Score:1

SMB file share not accessible for some users

tw flag

I have stepped up on a problem which I am not able to solve even with the help of forums.

I have a mounted drive /dev/sbd2 to /home/pi/shared with 3 folders each with different permissions.

There are 3 users: pi, honza, dan (unix and smb users) And all of them are part of user group samba

honza:x:1001:
dan:x:1002:
samba:x:1003:dan,honza,pi

My smb share is configured as follows

[public]
path = /home/pi/shared
writeable=Yes
create mask=0777
directory mask=0777
public=no

The problem I am facing is the user pi can access the network drive and the folder Vsichni, as it should

But neither users dan nor honza can access the network share - after log in, they get permission denied. I am quite sure this is linux permission issue

Here are the ls -l outputs from each directory, to me both seem fine. I appreciate any help !

/home/pi

total 36
drwxr-xr-x 2 pi pi    4096 Jan  5 09:52 Desktop
drwxr-xr-x 2 pi pi    4096 Jan  5 09:52 Documents
drwxr-xr-x 2 pi pi    4096 Jan  5 09:52 Downloads
drwxr-xr-x 2 pi pi    4096 Jan  5 09:52 Music
drwxr-xr-x 2 pi pi    4096 Jan  5 09:52 Pictures
drwxr-xr-x 2 pi pi    4096 Jan  5 09:52 Public
drwxrwxrwx 6 pi samba 4096 Apr 27  2019 shared
drwxr-xr-x 2 pi pi    4096 Jan  5 09:52 Templates
drwxr-xr-x 2 pi pi    4096 Jan  5 09:52 Videos

/home/pi/shared

total 28
drwxrwx---  5 dan   dan    4096 Feb  9  2021 Dan
drwxrwx--- 13 honza honza  4096 Dec 19 17:03 Honza
drwx------  2 root  root  16384 Apr 27  2019 lost+found
drwxrwxrwx 25 pi    samba  4096 Dec 28 15:23 Vsichni

UPDATE Even Windows user Management shows me the directory should be accessible to Everyone Screenshot

Score:0
tw flag

Ok, apparentely since the mounted directory is in /home/pi the only user who can access it is the user "pi" itself, even while the linux access rights say otherwise.

So the solution was to mount the disk to different directory, fe /usr/share

I sit in a Tesla and translated this thread with Ai:

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.