[Samba] giving user rights to files

Adam Nielsen adam.nielsen at uq.edu.au
Wed May 17 23:03:59 GMT 2006

> I have a Samba 3.0.22 server working as domain controller. When a user
> copy a file to a share, the file is owned by user root and group "no
> group" , not by the user and its group.
> All the users are in an LDAP directory, authentication works good, all
> groups are declared in LDAP too.
> What should I do to have the file with the right owner/group
> membership ?

Are you running winbindd?  You'll need this before the your non-UNIX
users can own files.  Once it's working, you should be able to do
something like "chown DOMAIN\\user text.txt".

> For groups, I maybe have to use the group map command. But for users ?

Group mapping (in my experience) doesn't work that well with winbind -
but winbind handles groups as well as users, so that shouldn't be a
problem.  One thing to bear in mind is that any new files created will
be owned by the user's *primary* group (which is probably 'Domain
Users') but you can make new files belong to the same group as the
folder by running "chmod g+s ." - then any new files created in that
folder will belong to the same group as the folder itself.


More information about the samba mailing list