Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
You need to setup an ACL for the folder so both users have access (this is the "best" way to do it). I don't know linux well enough to tell you the exact syntax, but it should be in man setfacl or man setacl. – Chris S Nov 19 '10 at 14:39
Thanks. I can get this to work on a normal directory in my main partition but when I try it in the actual directory I need it to work with (which is mounted as an LVM volume inside the ftpuser's home folder) it doesn't work - premission denied. I double checked the ACL but can't find anything wrong. Here it is: [root@CENTOS-OPENBD home]# getfacl ftpuser/ # file: ftpuser # owner: ftpuser # group: ftpuser user::rwx group::--- other::--- default:user::rwx default:user:smbuser:rwx default:group::--- default:mask::rwx default:other::--- – Xoundboy Nov 27 '10 at 16:55

they also have a nice automatic calculator at the bottom!

share|improve this answer

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

share|improve this answer
Hi. Thanks. I tried this but it didn't work either. I'm still getting a permission denied error when trying to connect from windows. Is it something to do with the fact that the directory I'm trying to access is a mounted partition? – Xoundboy Nov 30 '10 at 12:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.