I get "permission denied" accessing a samba share

I'm new here, and after some researching I found that I 'think' I need help. I hope I am doing correctly and maybe my english is not perfect, but I try. So let's get started.

I have computer with Ubuntu Server 18.04.6 installed (x64). More specs:

-Samba server installed (package samba) and configured.

-ZFS storage installed and configured - mounted in /free.

-SSH password auth disabled - authentication via private key with user borhacker.

-I have my main shares directory under the zfs pool, in /free/fr/... . For example, /free/fr/data - /free/fr/video - /free/fr/music - etc.

-Regarding to the samba users, I have 6 - borhacker - papa - mama - alex - raspberry - family - and all of them have their samba password adjusted via sudo smbpasswd -a alex (for example)

Now, from yesterday, I figured out that I can only browse and use the shares from the user borhacker.

I'm trying to access [Fr-data] share from alex user (from Windows 7 system), but it says You can't access V:\ access denied.

I have also correctly set up user and permissions for a special share for him called [Fr-vidalex] in /free/fr/vidalex - it doesn't work . Then I tried to search several times in google but I didn't find a solution. Now I figured out maybe his home directory doesn't give me problems, so I set [Fr-vidalex] to path = /home/alex - and now it works. but only this share.

I can give the output from command pdbedit -L -v that I found in another web site; my /etc/samba/smb.conf contents; the contents of /etc/group; the ownership and permissions of [Fr-data] directory and [Fr-vidalex] old directory, and /home/alex too. Initially I tried to put them all in the question, but the system of AskUbuntu doesn't let me publish - it marks my message as spam - maybe too much information. Now I will post smb.conf and I anyone willing to help asks me for more information, I will post. The first sections are unchanged so I didn't post. I only edited the shares, and I'm posting them.



[Fr-data]
path = /free/fr/data
read-only = yes
valid users = @global
write list = borhacker
force create mode = 0775
force directory mode = 0775
create mask = 0775
directory mask = 0775

[Fr-portable]
path = /free/fr/portable
read-only = yes
valid users = @global
force create mode = 0775
force directory mode = 0775
create mask = 0775
directory mask = 0775

[Fr-portablefr]
path = /free/fr/portablefr
read-only = yes
valid users = @global
force create mode = 0775
force directory mode = 0775
create mask = 0775
directory mask = 0775

[Fr-backup]
path = /free/fr/backup
read-only = no
valid users = borhacker
write list = borhacker
force create mode = 0770
force directory mode = 0770
create mask = 0770
directory mask = 0770

[Fr-emu]
path = /free/fr/emu
read-only = yes
valid users = @global
write list = @raspberry
force group = raspberry
force create mode = 0775
force directory mode = 0775
create mask = 0775
directory mask = 0775

[Fr-images]
path = /free/fr/images
read-only = no
valid users = borhacker
write list = borhacker
force create mode = 0770
force directory mode = 0770
create mask = 0770
directory mask = 0770

[Fr-mama]
path = /free/fr/mama
read-only = no
valid users = @mama
write list = @mama
force group = mama
force create mode = 0770
force directory mode = 0770
create mask = 0770
directory mask = 0770

[Fr-papa]
path = /free/fr/papa
read-only = no
valid users = @papa
write list = @papa
force group = papa
force create mode = 0770
force directory mode = 0770
create mask = 0770
directory mask = 0770

[Fr-music]
path = /free/fr/music
read-only = yes
valid users = @global
write list = borhacker
force create mode = 0775
force directory mode = 0775
create mask = 0775
directory mask = 0775

[Fr-todos]
path = /free/fr/todos
read-only = no
valid users = @global
write list = @global
force group = global
force create mode = 0770
force directory mode = 0770
create mask = 0770
directory mask = 0770

[Fr-video]
path = /free/fr/video
read-only = yes
valid users = @global
write list = borhacker
force create mode = 0775
force directory mode = 0775
create mask = 0775
directory mask = 0775

[Fr-workplace]
path = /free/fr/workplace
read-only = no
valid users = borhacker
write list = borhacker
force create mode = 0770
force directory mode = 0770
create mask = 0770
directory mask = 0770

[Fr-transmission]
path = /free/transmission
read-only = yes
valid users = @debian-transmission
write list = borhacker
force group = debian-transmission
force create mode = 0775
force directory mode = 0775
create mask = 0775
directory mask = 0775

[Fr-vidalex]
path = /home/alex
read-only = no
valid users = alex
force create mode = 0775
force directory mode = 0775
create mask = 0775
directory mask = 0775

Any help would be appreciated. Thanks for your time and your attention.

cheers

Borhacker

edit

Hi Morbius1! thanks for your answer This is the ls -al output

borhacker@freebnt:~$ ls -al /free/fr/
total 152
drwxrwx--- 15 borhacker borhacker 15 Dec 19 12:39 .
drwxr-xr-x  5 root      root       5 Sep 19 12:30 ..
drwxrwx--- 36 borhacker borhacker 38 Dec 16 21:33 backup
drwxrwxr-x 26 borhacker borhacker 26 Dec 14 15:05 data
drwxrwxr-x 14 raspberry raspberry 20 Dec 10 16:34 emu
drwxrwx--- 23 borhacker borhacker 23 Dec 10 16:34 images
drwxrwx---  8 mama      mama       8 Dec 10 16:34 mama
drwxrwxr-x  8 borhacker borhacker  8 Dec 10 16:35 music
drwxrwx---  8 papa      papa      10 Dec 18 22:48 papa
drwxrwxr-x  3 borhacker borhacker  3 Nov  9 20:21 portable
drwxrwxr-x  5 borhacker borhacker  5 Nov 19 17:07 portablefr
drwxrwx---  7 borhacker global    13 Dec 18 22:32 todos
drwxrwxr-x  2 alex      alex       2 Dec 19 12:39 vidalex
drwxrwxr-x 10 borhacker borhacker 10 Dec 10 16:35 video
drwxrwx---  3 borhacker borhacker  5 Dec 16 20:59 workplace
borhacker@freebnt:~$

And here is the output of the /etc/group

root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:syslog,borhacker
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:
fax:x:21:
voice:x:22:
cdrom:x:24:borhacker
floppy:x:25:
tape:x:26:
sudo:x:27:borhacker
audio:x:29:
dip:x:30:borhacker
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:
sasl:x:45:
plugdev:x:46:borhacker
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
systemd-journal:x:101:
systemd-network:x:102:
systemd-resolve:x:103:
input:x:104:
crontab:x:105:
syslog:x:106:
messagebus:x:107:
lxd:x:108:borhacker
mlocate:x:109:
uuidd:x:110:
ssh:x:111:
landscape:x:112:
borhacker:x:1000:
rdma:x:113:
sambashare:x:114:
papa:x:1001:borhacker
mama:x:1002:borhacker
family:x:1004:
raspberry:x:1005:borhacker
global:x:1006:borhacker,mama,papa,family,raspberry,alex
debian-transmission:x:115:borhacker
alex:x:1003:

Solution 1:

Let's take just the first share as an example - and here I'm correcting the read-only = yes line:

[Fr-data]
path = /free/fr/data
read only = yes
valid users = @global
write list = borhacker
force create mode = 0775
force directory mode = 0775
create mask = 0775
directory mask = 0775

The only user that will gain access to the folder being shared is borhacker. Not becase of the share definition in smb.conf but becase the parent folder only allows that user access. In fact borhacker is the only user that can access any of these shares for the same reason.

This represents the Linux permissions on /free/fr:

drwxrwx--- 15 borhacker borhacker 15 Dec 19 12:39 .

You need to allow users other than borhacker the ability to traverse the /free/fr folder:

sudo chmod 775 /free/fr

A samba share definition cannot override the Linux permissions of the folder being shared or the Linux permissions of the path to that folder