Recently I had to re-install Ubuntu Server 20.04, which had a zfs pool. After the installation, I was able to restore the zfs volume.
But I cannot write to that volume from an Ubuntu Desktop 20.04, receiving a 'permission denied' error. Why am I getting this error? Could it be something with the restoration of the zfs volume? Even root cannot write to this smb share.
workstation:
$ id
uid=1000(larry) gid=1000(larry) groups=1000(larry),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare),997(docker)
$ mount | grep data
//192.168.10.20/data on /mnt/data type cifs
(rw,relatime,vers=3.0,cache=strict,username=larry,uid=1000,noforceuid,gid=1000,
noforcegid,addr=192.168.10.20,file_mode=0755,dir_mode=0755,
soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,
bsize=1048576,echo_interval=60,actimeo=1)
server:
$ id
uid=1000(larry) gid=1000(larry) groups=1000(larry),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lxd)
$ zfs get all tank/data
NAME PROPERTY VALUE SOURCE
tank/data type filesystem -
tank/data setuid on default
tank/data readonly off default
tank/data aclinherit restricted default
tank/data sharesmb off default
From /etc/samba/smb.conf:
[global]
workgroup = WORKGROUP
server string = Samba Server
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no
[data]
path = /tank/data
browsable =yes
writable = yes
guest ok = yes
read only = no
create mask = 644
List directories:
Server:
$ ls -ld Larry*
drwxr-xr-x 55 larry larry 118 Apr 6 15:01 Larry/
drwxr-xr-x 2 larry larry 2 Sep 10 06:56 Larry2/
Workstation:
$ ls -ld /mnt/data/Larry*
drwxr-xr-x 2 larry larry 0 Sep 10 08:56 /mnt/data/Larry/
drwxr-xr-x 2 larry larry 0 Sep 10 08:56 /mnt/data/Larry2/
Perform tests:
Server:
$ touch Larry/test
$ touch Larry2/test
$ rm Larry/test Larry2/test
Workstation:
$ touch /mnt/data/Larry/test
touch: cannot touch '/mnt/data/Larry/test': Permission denied
$ touch /mnt/data/Larry2/test
touch: cannot touch '/mnt/data/Larry2/test': Permission denied
$ sudo touch /mnt/data/Larry/test
touch: cannot touch '/mnt/data/Larry/test': Permission denied