1

I have setup a samba server on 18.04 and run into a problem with access of sambashares

  • user can access his home folder through samba (so I know the [samba]user exists, credentials are recognized)
  • same user can not access any sambashare (even though user is in the group required, access rights are 774)

smb.conf looks like this:

   [global]
   workgroup = WORKGROUP
   server string = %h server (Samba, Ubuntu)
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = no
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user

#============== Share definitions =======================


[samba]

    comment = Share for group Warehouse
    path = /srv/smb/samba/
    browseable = yes
    writeable = yes
    force create mode = 0660
    force directory mode = 0660
    Valid users = @sambausers

Any idea, what the root of this trouble may be?

2
  • 1
    Run "ls -dl /srv/smb/samba". What group is displayed? If it's not sambausers the remote user will not gain access. So either change the group ownership of the folder or set permissions to 777. – Morbius1 May 2 '18 at 21:32
  • thx @Morbius1: that actually showed a 'good' group. solution came with the group of the parent/base folder (see below) – vrms May 3 '18 at 0:13
1

apparently the group of the parent folder of the share (/srv/smb in my case) does actually matter.

changing that to sambashare (which all my samba users are members off) fixed this issue.

1
  • 1
    Nope. What does matter is if members of the sambashare group can traverse the /srv/smb folder to get to the /samba folder. So regardless of the group of /srv/smb sambashare members would get access to /samba if the permissions of /srv/smb were 755, 775, 777, or even 711. But not 700, 770, or this curious 774 you are using since the "4" disables the traversal unless the group matches. – Morbius1 May 3 '18 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.