How to: Implement Samba Share on CIFS (Common Internet File System)

It took me a while to achieve the proper implementation and inheritance of privileges. But all in all, it boils down to this post.

I will make this short and easy.

Mounting a Network Attached Storage (NAS) via file system table (fstab):

//192.168.1.2/MyShare /mnt/MyShare cifs user=MyUser,pass=MyPassword,gid=users,rw 0 0

Add samba user account to users group:
usermod -G users aby

And lastly, in Samba config:

[myshare]
path = /mnt/MyShare
valid user = aby
force user = aby
force group = users
browseable = yes
writable = yes
public = no
create mask = 775
directory mask = 775

**Disclaimer: I had to this workaround for a NAS although without all these complex (if I may say) settings in another NAS actually worked and is still working. It’s just too weird to be true. (yes, weird. I can’t explain the orthodox myself.)

Tags: , ,

2 Responses to How to: Implement Samba Share on CIFS (Common Internet File System)

  1. Lysender says:

    Nice blog bro, nice theme! I seldom used linux but sometimes I did ssh on a CentOS dedicated hosting server.

    By the way, thanks for visiting my blog. :-)

  2. I like your weblog a lot. Will read more. Keep up to great posting on it. ty

Leave a Reply

Name and Email Address are required fields. Your email will not be published or shared with third parties.