I have a samba server running on ubuntu server 12.04. Only one folder /sharetest is shared with group storageusers, and users user1, user2, wowza are members of it. Here is smb.conf

#======================= Global Settings =====================================
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no
#============================ Share Definitions ==============================
path            = /sharetest
browsable       = yes
writeable       = yes
guest ok        = no
valid users     = @storageusers
create mask     = 0775
directory mask  = 0775

A second ubuntu server 12.04 will be using above mentioned share. The share on the second server is automounted via fstab line

// /share smbfs credentials=/root/.smbcredentials,gid=0 0 0

File and folders created inside share folder on the second server have ownership of user wowza and group wowza. I assume because of this other share users do not have access to writing or deleting files and folders. Is there a setting for samba server that will force all files and folders created on share to have group ownership set to storageusers instead of user's primary group?

1 Answer 1


I was able to find the answer about ten minutes after posting this. Source: http://www.linuxquestions.org/questions/linux-server-73/ownership-on-new-files-in-group-samba-share-set-badly-898489/

chgrp storageusers /sharetest && chmod g+s /sharetest
  • Super, thanks ! Commenting the ForceGroup option in your samba share definition (and if you were using it) seems a good move too. I also added all the needed groups in valid groups.
    – tisc0
    Sep 5, 2022 at 9:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .