I am running Ubuntu 20.04. I have setup a small Samba share server for my home network. I plugged in my 2tb external drive and Ubuntu found it and mounted it right away. The drive is in HFS+, so I can read the files, just can't write to them. That doesn't really bother me, cause I just want it to be a file share at this point, I don't need to open the files in Ubuntu anyway. My problem lies in sharing the external drive via Samba. When I right click to share the drive(or any folders) there is no option to share. So I tried doing everything the old fashioned way through terminal. I tried setting permissions, edited the smb.conf file, etc. Still won't share it. Do I have to format the drive to exFAT or FAT to make the drive shareable?
Did this with Rasbian so should be similar.
Very loose instructions....slapped together from memory and quick google copies
Update everything for your setup
On Ubuntu, you'll create your general share directory and
Set permissions
sudo mkdir /home/shares
sudo mkdir /home/shares/public
sudo mkdir /home/shares/public/whateverdirectoryforUSB
sudo chown -R root:users /home/shares/public
sudo chmod -R ug=rwx,o=rx /home/shares/public
Configure samba (adjust accordingly and your'll need to restart the samba service.
[share]
Comment = Shared Folder
Path = /home/shares/public
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes
Make sure the users are setup has
sudo smbpasswd -a youruser
Mount the usb drive into the share directory with appropriate uid
sudo mount /dev/sdxxx /home/shares/public/whateverdirectoryforUSB -o uid=whoever,gid=whoever
then update fstab to handle restarts
/dev/sdxxx /home/shares/public/whateverdirectoryforUSB -o uid=whoever,gid=whoever