Warum kann Samba auf einige Verzeichnisse keinen Zugriff gewähren?

Warum kann Samba auf einige Verzeichnisse keinen Zugriff gewähren?

Ich habe einen Server mit installiertem Samba. Ich muss einige Verzeichnisse unter dem Pfad /var/spool freigeben. Aber ich habe ein seltsames Problem: Ich kann mit Samba nicht auf /var/spool zugreifen.

Es gibt /etc/smb.conf (ich habe "/" zu Testzwecken freigegeben. Früher hatte ich dort "/var/spool/asterisk/monitor"):

############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

ICHhabenZugriff auf /varund /home/asterisk_recordingsvon der Samba-Freigabe.

aber ichhaben keinZugang zu /asterisk_recordingsund/var/spool

Dies ist ihre statAusgabe:

[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

Was könnte ein Fehler sein?

Antwort1

Der Grund waren die SELinux-Einstellungen.

setsebool -P samba_export_all_ro 1hat mein Problem gelöst.

verwandte Informationen