Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

/etc/samba/smb.conf :

[global]
workgroup = w
server string = server
security = user
load printers = no
debug level = 10
log file = /var/log/samba/%m.log
max log size = 5000
dns proxy = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes 

unix extensions = no
# if I comment above line, I can write to /home/shareuser/writable

follow symlinks = yes
wide links = yes 

[writable]
comment = test
writable = yes 
valid users = shareuser
path=/home/shareuser/writable

shareuser has valid passwd and smbpasswd (-a)

I mount the share like this: mount -t cifs //server/writable mountpoint/ -o username=shareuser

With unix extensions = yes, I can write to the share.

With unix extensions = no, I can't write to the share.

Any help greatly appreciated :)

Edit: simplified the example

Edit: /var/log/samba/log.smbd

[2012/09/23 22:42:32,  0] smbd/server.c:1053(main)
  smbd version 3.6.8 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2012/09/23 22:42:32,  5] ../lib/util/debug.c:330(debug_dump_status)
  INFO: Current debug levels:
    all: 10
    tdb: 10
    printdrivers: 10
    lanman: 10
    smb: 10
    rpc_parse: 10
    rpc_srv: 10
    rpc_cli: 10
    passdb: 10
    sam: 10
    auth: 10
    winbind: 10
    vfs: 10
    idmap: 10
    quota: 10
    acls: 10
    locking: 10
    msdfs: 10
    dmapi: 10
    registry: 10
  doing parameter log file = /var/log/samba/%m.log
  doing parameter max log size = 5000
  doing parameter dns proxy = no
  doing parameter printing = bsd
  doing parameter printcap name = /dev/null
  doing parameter disable spoolss = yes
  doing parameter unix extensions = no
  doing parameter follow symlinks = yes
  doing parameter wide links = yes
[2012/09/23 22:42:32,  4] param/loadparm.c:9608(lp_load_ex)
  pm_process() returned Yes
[2012/09/23 22:42:32,  7] param/loadparm.c:9834(lp_servicenumber)
  lp_servicenumber: couldn't find homes
[2012/09/23 22:42:32, 10] param/loadparm_server_role.c:101(set_server_role)
  set_server_role: role = ROLE_STANDALONE
[2012/09/23 22:42:32,  5] ../lib/util/charset/codepoints.c:235(map_locale)
  Substituting charset 'UTF-8' for LOCALE
[2012/09/23 22:42:32,  2] lib/tallocmsg.c:124(register_msg_pool_usage)
  Registered MSG_REQ_POOL_USAGE
[2012/09/23 22:42:32,  2] lib/dmallocmsg.c:78(register_dmalloc_msgs)
  Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED

Edit: /var/log/samba/smbd.log

/var/log/samba/smbd.log -- pastebin

share|improve this question
add comment

1 Answer

Just maybe the reason of this confusion is in directory ownership and permissions. I took my working config file. Take a note about "force *" instructions.

[usb]
   path = /usb
   force user = akond
   force group = +wheel
   force group = akond
   create mask = 0666
   force create mode = 0666
   force directory security mode = 0666
   directory mode = 0777  #and
   force directory mode = 0777  #or
   writeable = yes

p.s.

I have unix extensions = no.


UPDATE

[global]
        interfaces = 192.168.2.113
        workgroup = BUNKER
        netbios name = NFS
        admin users= @"Domain Admins"
        server string = Samba Server %v
        security = USER
        encrypt passwords = Yes
        obey pam restrictions = No
        ldap passwd sync = Yes
        unix password sync = Yes
        passwd program = /usr/local/sbin/smbldap-passwd "%u"
        passwd chat = *new*password* "%n"\n *new*password* "%n"\n *updated*successfully*
        log level = 0
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 100000
        time server = Yes
        socket options = TCP_NODELAY
        mangling method = hash2

        logon script = startup.cmd
        logon drive = H:
        logon home =
        logon path =

        domain logons = Yes
        os level = 200
        passdb backend = ldapsam:ldap://192.168.2.113/
        ldap admin dn = cn=manager,dc=tmd,dc=loc
        ldap suffix = dc=tmd,dc=loc
        ldap group suffix = ou=Group
        ldap user suffix = ou=People
        ldap machine suffix = ou=Computers

        add user script = /usr/local/sbin/smbldap-useradd -m "%u"
        ldap delete dn = Yes
        delete user script = /usr/local/sbin/smbldap-userdel "%u"
        add machine script = /usr/local/sbin/smbldap-useradd -t 0 -w "%u"
        add group script = /usr/local/sbin/smbldap-groupadd -p "%g"
        add user to group script = /usr/local/sbin/smbldap-groupmod -m "%u" "%g"
        delete user from group script = /usr/local/sbin/smbldap-groupmod -x "%u" "%g"
        set primary group script = /usr/local/sbin/smbldap-usermod -g '%g' '%u'


        load printers = No
        hosts allow = 192.168.2.0/24 , 127. , 192.168.1.0/24
        unix charset = UTF8
        dos charset = 866
        preserve case = yes
        short preserve case = yes
        default case = lower
        case sensitive = no

        create mask = 0664
        directory mask = 0775
        force create mode = 0664
        force directory mode = 0775

[homes]
        comment = repertoire de %U, %u
        read only = No
        create mask = 0644
        directory mask = 0775
        browseable = No

[netlogon]
        path = /storage/samba/netlogon/
        browseable = No
        read only = yes

[files]
        path = /files
        browseable = Yes
        read only = No
        directory mask = 0777
        create mask = 0666
share|improve this answer
    
Thank you for replying! Unfortunately this doesn't work for me :(. I copied your example as is (I just changed the path, username and group) and restarted smbd but no success :( –  MCH Sep 23 '12 at 18:29
    
What is in the log file? –  akond Sep 23 '12 at 18:37
    
Well -- there seems to be nothing in the log -- but I'm not completely sure since I'm using systemd/journalctl without syslog-ng and I'm not sure if that is logging samba correctly (I switched a few days ago). I will try to figure this out asap –  MCH Sep 23 '12 at 19:17
    
I don't think that helps, but all that is logged by smbd is: "standard input is not a socket, assuming -D option" when starting up -- I guess there should be more !? –  MCH Sep 23 '12 at 19:42
    
Add debug level = 10 and security = user in global section –  akond Sep 23 '12 at 19:55
show 17 more comments

Your Answer

 
discard

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.