Por que o samba não pode conceder acesso em alguns diretórios?

0

Eu tenho um servidor com o samba instalado. Eu preciso compartilhar alguns diretórios sob o caminho / var / spool. Mas enfrentei um problema estranho: não consigo acessar o / var / spool com o samba.

Existe /etc/smb.conf (eu compartilhei "/" para testar. Eu tinha "/ var / spool / asterisk / monitor" lá antes):

############SMB.CONF##############
[global]
workgroup = DOMAIN
server string = DPM
netbios name = DPM
netbios aliases = fileserver
security = user
username map = /etc/samba/smbusers
encrypt passwords = yes
map to guest = bad user
hosts allow = 192.168.1.10
load printers = no
disable spoolss = yes
local master = no
unix charset = utf-8
dos charset = cp866
unix extensions = No
wide links = Yes
follow symlinks = Yes

[recordings]
  path = /
  writeable = no
  guest ok = yes
  browseable = yes

Eu tenho acesso a /var e /home/asterisk_recordings do compartilhamento de samba.

mas eu não tenho acesso a /asterisk_recordings e /var/spool

Esta é sua stat output:

[root@mistral home]# stat /asterisk_recordings/
  File: «/asterisk_recordings/»
  Size: 4096            Blocks: 8          IO Block: 4096   каталог
Device: 902h/2306d      Inode: 44564481    Links: 2
Access: (0775/drwxrwxr-x)  Uid: (  498/asterisk)   Gid: (  498/asterisk)
Access: 2016-10-15 04:07:42.351252721 +0700
Modify: 2016-10-15 04:08:13.475252709 +0700
Change: 2016-10-15 04:26:09.004783795 +0700

[root@mistral home]# stat /home/asterisk-recordings/
  File: «/home/asterisk-recordings/»
  Size: 4096            Blocks: 8          IO Block: 4096   каталог
Device: 902h/2306d      Inode: 11796594    Links: 2
Access: (0775/drwxrwxr-x)  Uid: (  498/asterisk)   Gid: (  498/asterisk)
Access: 2016-10-15 04:25:21.600783813 +0700
Modify: 2016-10-15 03:28:01.698832140 +0700
Change: 2016-10-15 04:02:58.235252829 +0700

[root@mistral home]# stat /var
  File: «/var»
  Size: 4096            Blocks: 8          IO Block: 4096   каталог
Device: 902h/2306d      Inode: 38797313    Links: 18
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-10-14 22:17:06.070466036 +0700
Modify: 2016-10-02 20:33:45.489395585 +0700
Change: 2016-10-02 20:33:45.489395585 +0700

[root@mistral home]# stat /var/spool
  File: «/var/spool»
  Size: 4096            Blocks: 8          IO Block: 4096   каталог
Device: 902h/2306d      Inode: 38797581    Links: 10
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-10-15 02:15:24.569158693 +0700
Modify: 2016-10-15 00:26:50.642447066 +0700
Change: 2016-10-15 00:47:54.304488080 +0700

O que poderia estar errado?

    
por John Smith 14.10.2016 / 23:39

1 resposta

0

Bem, as configurações do SELinux foram o motivo.

setsebool -P samba_export_all_ro 1 resolveu meu problema.

    
por 16.10.2016 / 17:03