Question: I have a Centos VM with Samba server and a user on that machine called smbuser in group smbuser. I can connect to my samba share /home/smbuser from my Windows 7 PC no problem. Also on the Centos VM I have another folder /home/ftpuser owned by ftpuser:ftpuser. I set up another samba share to allow smbuser access to this folder but when I try to connect to it from the Windows machine I get an access denied error. So I changed ownership of the ftpuser folder so it was owned by smbuser and it works. 

The problem is now that I can't connect to ftpuser with my ftp client. I need both means of access - smb for working on files and ftp for transferring large quantities of data as fast as possible. (Samba is slow). I tried putting the smbuser into the ftpuser group but that didn't work. Please could someone enlighten me - I'm new to the concept of unix groups and exactly how they work.

Answer: 
<http://www.unixref.com/guides/chmodGuide.html>

they also have a nice automatic calculator at the bottom!
Try adding:

```
valid users = @commongroup
force group = commongroup
create mask = 0775
directory mask = 0775

```

To your share in your smb.conf file where "commongroup" is a group name both belong to.
For the above to work both users should be in a common group, and you might need to chown the folders that already exist to be owned by this common group.

If you use the "ftpuser" group above and want to add "smbuser" you can do:
`usermod smbuser -g ftpuser`