Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 was using debian squeeze and yesterday I did an upgrade to debian wheezy. Everything but samba is working fine.

When I connect to samba and login with the known users I do not have the rights to read and write. Before this was no problem.

The directory rights in /var/www (where I am trying to look into files):

drwxr-xr-x 7 www-data www-data 4096 aug 5 20:15 www-test/

The file rights within /var/www/www-test/:

-rw-r--r-- 1 www-data www-data 2112 aug 5 20:15 composer.json

I changed the rights in the directory to:


Now I can create files but, although I use for user = www-data the user will be root. So this is not a real option. Besides that I rather have it working like it would normally behave as if you didn't do a chmod/

I would like it to behave as I used to.

I did not change my smb.conf so can anyone have a look and help out to see why I cannot read and write files and why the force user does not work?

here is my smb.conf:

    server string = %h server
    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* .
    unix password sync = Yes
    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 = var
    path = /var/
    valid users = bart-jan, root
    admin users = bart-jan, root
    write list = bart-jan, root
    force user = www-data
    force group = www-data
share|improve this question
Can you tell us if the user that logs in is member of www-data ? When the user logs in how is this samba share mounted? Flags etc? – val0x00ff Aug 6 '13 at 13:44
The user is a standard user in Debian and of course I created the same user with smbpasswd -a bart-jan. Because it is not a member of the www-data group I do the force group = www-data. This all used to work but now with the newer version it won't work. I just set the directories with chmod 775 and the files with 664. Then I can add, remove and change files or directories. looking in debian I see the user is set to root (log in as bart-jan) and the group is www-data. – BonifatiusK Aug 6 '13 at 19:37

Your Answer


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

Browse other questions tagged or ask your own question.