Basic file sharing using nemo

No it does not

Remove the lines to clean up your /etc/fstab

That depends on what you mean with “flaky” :slight_smile: but if you update your system and kernel is updated or samba is updated - you will need to restart your system otherwise the sharing may fail.

When you have nofail in fstab there is no guarantee the path is available.

Possibly why you get the File Not Found message
If the device is a fixed device you should mount it at boot but if the device is a removable device you have an issue if the device is not available - your system will boot - but your share will fail.

When the path is mounted by the system it is mounted by root and permissions will reflect the fact. The permissions on the file system does not change because samba defines it otherwise.

If you want the mount location to be writable you will need to change permissions on the folder.

If the permissions is limited to your user - you can do

sudo g+w /mnt/DataLaptop
sudo chown root:$USER /mnt/DataLaptop

Even if you have defined the smb share DataLaptop as readwrite the filesystem will prevent write access if the mount point permissions do not allow it.

This is how I would do it

Posted as guide [root tip] [How To] Step By Step - File Share Using Samba

I have years of system admin practise with networks and servers so I have a very specific approach to separate the system and the file shares.

  1. Create a group called smbusers

    sudo groupadd smbusers
    
  2. Add yourself to that group (you need to log off for the group to take effect)

    sudo gpasswd -a $USER smbusers
    
  3. Ensure your user is in the samba password database

    sudo smbpasswd -a $USER
    
  4. Create the mountpoint /a/DataLaptop and assign group permissions

    sudo mkdir -p /a/DataLaptop
    sudo chmod g+w /a/DataLaptop
    sudo chgrp smbusers /a/DataLaptop
    
  5. Create a mount unit for your data disk/partition

    touch /etc/systemd/system/a-DataLaptop.mount
    

    Edit the mount unit

    [Unit]
    Description=Mount build partition
    
    [Mount]
    What=/dev/disk/by-partlabel/DataLaptop
    Where=/a/DataLaptop
    Type=auto
    Options=rw,noatime
    
    [Install]
    WantedBy=multi-user.target
    
  6. Start the mount unit

    sudo systemctl enable --now a-DataLaptop.mount
    
  7. Replace the content of your existing smb.conf with

    [global]
    	server role = standalone server
    	max log size = 50
    	map to guest = Bad Password
    	guest account = nobody
    	unix password sync = yes
    	passwd program = /usr/bin/passwd %u
    	passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
    	obey pam restrictions = yes
    	pam password change = yes
    	server string = chameu samba service
    	workgroup = CHAMEU
    	log file = /var/log/samba/%m.log
    
    [DataLaptop]
    	path = /a/DataLaptop
    	guest ok = no
    	browseable = yes
    	comment = Share for laptop exchange
    	read only = no
    	inherit permissions = no
    
  8. Restart your samba service

    sudo systemctl restart smb
    
  9. Ensure the service is discoverable

    sudo systemctl enable --now avahi-daemon