So I have the following setup:
- Ubuntu 22.04 running my home server headless
- a 4TB hard drive plugged in via USB, which is NTFS because I would like to sometimes plug it into another Windows machine
- the mounting is configured in
/etc/fstab
as:/dev/sdb2 /media/myname ntfs-3g windows_names,uid=myname,gid=usbdrive,umask=007,nofail,nobootwait 0 0
- where the
usbdrive
group is created by me and contains my accountmyname
and all other users that need access to that drive (jellyfin
,www-data
etc.)
So far everything worked, but complications arise when I wanted to also Samba share a part of this drive.
The only way I can manage to see the share appear on Windows is with umask=000
in fstab and guests ok = yes
in the Samba config. And I'd like to avoid both of these for security reasons. Obviously(?) if I managed to connect with my ubuntu local user account (with guests ok = no \ force user = myname
), umask=007
should suffice, so I think the actual question is, how to set up the share in such a way that it will ask and accept my local ubuntu credentials?
Previously I managed to set up such Samba shares, but on this 'specially mounted' drive Windows keeps saying 'access denied' for the correct ubuntu user credentials.