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

I have a Debian Wheezy with a Samba (3.6) server installed with a /share folder, and I don't know why but files get created as user root instead of user (uid=1000), here is my conf:

        server string = %h server
        map to guest = Bad User
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        dns proxy = No
        panic action = /usr/share/samba/panic-action %d
        idmap config * : backend = tdb

        comment = my share
        path = /share
        valid users = user
        admin users = user
        write list = user
        force user = user
        force group = user
        read only = No
        create mask = 0660
        directory mask = 0660

I tried force user = user and force group = user but it doesn't look like it worked...

On my windows machine, when I create a file I get:

$ la /share
-rw-rw---- 1 root user       0 Jun  2 10:52 testfile.txt

Any insight appreciated :-)

share|improve this question
Just to confirm, you are logging in as user and the directory /share is writable by user? –  Robbie Mckennie Jun 2 '13 at 9:16
Yes, the rights on the directory are drwxr-xr-x 5 user nogroup 4096 Jun 2 10:52 share –  Chuck M Jun 2 '13 at 9:18
Do you get the same result without any kind of 'force' option? –  Robbie Mckennie Jun 2 '13 at 9:48
Yes, same result. –  Chuck M Jun 2 '13 at 12:54

1 Answer 1

It is a mix of two items

admin users = user
force user = user

The first causes files created by user to be owned by root, the second causes all users to act as if there were user.

Remove admin users = user and then make sure that /share has read/write for the user user.

share|improve this answer

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.