permissionsmountsambasmbdirectory-permissions

mount samba make folder unaccessible


I have created a folder and 770 it; when I try to mount a samba share, permissions are changed to 670 and I cannot access folder data; but if I "su" I can access all the data.

My command is:

sudo smbmount //192.168.1.5/docs /home/my_user/docs -o user=my_user,domain=DOMAIN,uid=my_user,gid=domain_admins

smb.conf is:

[global]
 workgroup = domain
 netbios name = server
 server string = File Server
 enable privileges = yes
 interfaces = lo,eth0
 bind interfaces only = Yes
 passdb backend = ldapsam:ldapi://%2fvar%2frun%2fslapd%2fldapi
 ldap ssl = Off
 log level = 1
 syslog = 0
 log file = /var/log/samba/%m
 max log size = 50
 vfs objects = full_audit
 full_audit:success = connect opendir open disconnect unlink mkdir rmdir rename
 full_audit:failure = none
 smb ports = 137 138 139 445
 name resolve order = wins bcast hosts
 time server = Yes
 printcap name = CUPS
 wins support = Yes
 dns proxy = Yes
 ldap suffix = dc=aaa,dc=bbb
 ldap machine suffix = ou=Computers
 ldap user suffix =  ou=Users
 ldap group suffix =  ou=Groups
 ldap idmap suffix = ou=Idmap
 ldap admin dn = cn=ccc,dc=aaa,dc=bbb
 map acl inherit = Yes
 printing = cups
 encrypt passwords = Yes
 obey pam restrictions = No
 ldap passwd sync = Yes
 mangling method = hash2
 logon script = logon.bat
 logon drive = Z:
 logon home =
 logon path = \\192.168.1.5\profiles\%U
 domain logons = Yes
 os level = 65
 preferred master = Yes
 domain master = Yes
 add user script = /usr/sbin/smbldap-useradd -m "%u"
 ldap delete dn = Yes
 add machine script = /usr/sbin/smbldap-useradd -w "%u"
 add group script = /usr/sbin/smbldap-groupadd -p "%g"
 add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
 delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
 set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"
 hide unreadable = yes

 [docs]
   comment = documents
   path = /home/samba/shares/docs
   valid users = @"users"
   read list = 
   write list = @"users"
   admin users = 
   read only = No
   browseable = Yes
   force create mode = 0660
   force directory mode = 0770
   vfs objects = full_audit

Solution

  • I solved it some time ago and forgot to post here. My problem was my shared folder permission, it was just rw, and it should be rwx