Samba is useful but many programs are not able to handle SMB protocol (eg notepadqq, geany, atom etc).
A more compatible way to use network drives is to map them with mount_cifs to a local path. Then all programs will be able to handle files from the network drives. However only root can mount file systems by default then the users may only use them in read only mode.
So what you have to do is mount it with sudo but define a specific user id
Method 1 – without fstab
This will only work for the current session.
Firstly, find the user id you are using via the command:
Then mount the filesystem with the following command:
sudo mount.cifs -o rw,username=bob,password=bobpass,uid=<id> //server.local/path /mnt/d
Method 2 – Using fstab
If you want to have the drives mapped after each reboot then:
- chmod +s /sbin/mount.cifs
- chmod +s /sbin/umount.cifs
- chmod 600 /etc/fstab
Now for each share do the following:
- mkdir localpath
- vim /etc/fstab
- add the following line:
//computer/share /localpath cifs user=sambausername,pass=sambapassword,rw,users 0 0
And you are ready.