Normally I would recommend a Linux file system format like ext4. However, as there is a need to use the disc on a non-Linux system, there are hardly any alternatives to the exfat format already in use.
Well, there should be no changes here, as you have executed the command in the root user home directory. The changes we have made only relate to the external disc.
exfat itself does not support Linux file system permissions. However, you can mount a corresponding file system with a special user/group. We have done this with the entry in /etc/fstab. All files on the external disc now belong to the user Plex. At least that’s how it looks to the system
There shouldn’t really be any security risk.
if you want you can change the two entries to plex/dietpi.
It’s a turn of phrase: “Throwing something at the wall to see what sticks.” To experiment in a haphazard or random way with the hope that some amount of success may be achieved.
So I meant that in my taking a few different suggestions from others while trying to get samba to work initially, I perhaps tried too many different things, or added too many lines to that config. Thus despite it eventually working, I had always wondered if there were things in there that were incorrect or simply unnecessary.
It’s been a while, but I recall there were a couple of flaws or omissions in the guide I followed back then. I had learned enough that I spotted them myself along the way… but I was so close to finishing the job that I tried a few different suggestions rather than start over with a different guide. So we threw a few things at the wall, and one of them worked
You mention changing those two force lines, so that’s one I can do certainly.
I appreciate you sticking with me on this and finding a workaround.
One more thing: are the two mask lines in each of these two sections correct, given the changes we have made? I’m also curious why the first set (0664 and 0075) do not match.
[dietpi]
comment = DietPi Share
path = /mnt/dietpi_userdata
browseable = yes
create mask = 0664
directory mask = 0775
valid users = dietpi
writeable = yes
max connections = 8
[PLEXDRIVE]
comment = Samba Share for Plex
path = /mnt/PLEXDRIVE
valid users = plexpi
browseable = yes
writeable = yes
create mask = 0775
directory mask = 0775
guest ok = no
force user = plex
force group = dietpi
follow symlinks = yes
read raw = yes
write raw = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
min receivefile size = 16384
use sendfile = yes
aio read size = 16384
aio write size = 16384
strict allocate = yes
strict locking = no
max connections = 8
These are the default file permission when you create a file via samba.
664 for the directory and 775 for files.
This is only important for creating for, not for deletion