0

Running samba on centos. Setting up some shares and having a curious issue. Same config for two different shares, I can access 1 but not the other.

[test2]
    path = /usr/test2
    writeable = no
    browsable = yes
    guest ok = yes
    guest only = yes
    public = yes
    read only = yes
    printable = no

[layout_runtime]
    path = /u/layout/runtime
    writeable = no
    browsable = yes
    guest ok = yes
    guest only = yes
    public = yes
    read only = yes
    printable = no

Permissions:

drwxrwxrwx.  17 root nobody 4.0K Sep 21 09:27 u
drwxrwxrwx. 12 root nobody 4.0K Aug 30 15:43 layout

drwxrwxrwx.   2 root   nobody    6 Sep 23 13:24 test2

/u is on a seperate set of drives. That is the only difference.

/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=0caacd23-f24f-4423-b33a-6b950385fe1a /boot                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0
/dev/disk/by-uuid/5b0cdb1d-53d4-4ec0-b5ab-111be8c77ec5 /u auto nosuid,nodev,nofail,x-gvfs-show 0 0

Trying to access the layout_runtime share from win I get "you don't have permission. Invalid handle"

Logs show nothing that I can see:

[2016/09/23 15:06:27.746849,  2] ../source3/smbd/service.c:862(make_connection_snum)
bmarkeyyoga (ipv4:192.168.206.184:50101) connect to service test2 initially as user nobody (uid=99, gid=99) (pid 21898)
[2016/09/23 15:06:35.547660,  2] ../source3/smbd/service.c:862(make_connection_snum)
bmarkeyyoga (ipv4:192.168.206.184:50101) connect to service layout_runtime initially as user nobody (uid=99, gid=99) (pid 21898)

No special config options other than these:

unix extensions = no
guest account = nobody
log level = 2

Testparm is fine:

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[kindle]"
Processing section "[test]"
Processing section "[test2]"
Processing section "[layout_runtime]"
Loaded services file OK.
WARNING: You have some share names that are longer than 12 characters.
These may not be accessible to some older clients.
(Eg. Windows9x, WindowsMe, and smbclient prior to Samba 3.0.)
Server role: ROLE_STANDALONE
TheEditor
  • 231
  • 1
  • 5
  • 15

1 Answers1

1

It's a SELinux thing apparently.

chcon -t samba_share_t <share_folder>

Fixed it.

MikeA
  • 362
  • 2
  • 5
TheEditor
  • 231
  • 1
  • 5
  • 15