Author Topic: Samba Shares "Access Denied"  (Read 5368 times)

rmillerd

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Samba Shares "Access Denied"
« on: December 23, 2015, 12:59:18 am »
After upgrading a 3.2 on Ubuntu 12.04 to 4.2 on 14.04 I'm having share permissions issues.  I've tracked it down to the fact that the /home/samba and other folders created by samba have gid of 1901 and smbd is not able to cd into the directory because it's running as the user who connected.

I am able to query ldap for users and groups with getent but I cannot find __USERS__ or a group with the ID 1901.

I'm wondering how to recreate the __USERS__ group in the directory and what gid should it have?

Also, how does samba decide what uid & gid to use when a new connection is made from a client?

Am I on the right path here? what else can I show to help get this resolved.

Code: [Select]
# smbstatus

Samba version 4.3.1-UNKNOWN-Zentyal
PID     Username      Group         Machine            Protocol Version
------------------------------------------------------------------------------
9404      3000024       1901          192.168.100.64 (ipv4:192.168.100.64:50199) SMB2_10
9388      3000024       1901          192.168.100.64 (ipv4:192.168.100.64:50198) SMB2_10

# ll -d /home/samba
drwxrwx---+ 6 root 1901 4096 Dec 15  2013 /home/samba/

# ll -d /home/samba/shares
drwxrwx---+ 4 root 10000 4096 Dec 21 02:04 /home/samba/shares/


Code: [Select]
# tail /var/log/samba/samba.log
[2015/12/22 16:33:21.125122,  3] ../source3/smbd/service.c:198(set_current_service)
  chdir (/home/samba/shares/SharedData) failed, reason: Permission denied
[2015/12/22 16:33:21.128802,  3] ../source3/smbd/service.c:198(set_current_service)
  chdir (/home/samba/shares/SharedData) failed, reason: Permission denied
[2015/12/22 16:33:21.130384,  3] ../source3/smbd/service.c:198(set_current_service)
  chdir (/home/samba/shares/SharedData) failed, reason: Permission denied
[2015/12/22 16:33:23.659516,  3] ../source3/smbd/service.c:198(set_current_service)
  chdir (/home/samba/shares/SharedData) failed, reason: Permission denied

Thank you
« Last Edit: December 23, 2015, 01:35:08 am by rmillerd »

pcready.cl

  • Zen Samurai
  • ****
  • Posts: 286
  • Karma: +13/-1
  • Zentyal Installer in Chile
    • View Profile
    • PC Ready Chile SpA
Email: contacto@pcready.cl
Teléfono: (+56 32) 314 0883
Skype: pcready.cl
Web: https://www.pcready.cl