Zentyal Forum, Linux Small Business Server

Zentyal Server => Directory and Authentication => Topic started by: rmillerd on December 23, 2015, 12:59:18 am

Title: Samba Shares "Access Denied"
Post by: rmillerd 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
Title: Re: Samba Shares "Access Denied"
Post by: pcready.cl on December 24, 2015, 09:21:40 pm
Check This:

https://forum.zentyal.org/index.php/topic,27108.msg99525.html#msg99525