Red Hat Training
A Red Hat training course is available for RHEL 8
3.9.3. Windows ACL を使用する共有の追加
本セクションでは、/srv/samba/example/
ディレクトリーのコンテンツを共有する example
という名前の共有を作成し、Windows ACL を使用する方法を説明します。
手順
ディレクトリーが存在しない場合は作成します。以下に例を示します。
#
mkdir -p /srv/samba/example/
SELinux を、
enforcing
モードで実行する場合は、そのディレクトリーにsamba_share_t
コンテキストを設定します。#
semanage fcontext -a -t samba_share_t "/srv/samba/example(/.*)?"
#restorecon -Rv /srv/samba/example/
/etc/samba/smb.conf
ファイルにサンプル共有を追加します。たとえば、共有の write-enabled を追加するには、次のコマンドを実行します。[example] path = /srv/samba/example/ read only = no
注記ファイルシステムの ACL に関係なく、
read only = no
を設定しないと、Samba がディレクトリーを読み取り専用モードで共有します。すべての共有の
[global]
セクションで Windows ACL サポートを有効にしていない場合は、以下のパラメーターを[example]
セクションに追加して、この共有に対してこの機能を有効にします。vfs objects = acl_xattr map acl inherit = yes store dos attributes = yes
/etc/samba/smb.conf
ファイルを検証します。#
testparm
firewall-cmd
ユーティリティーを使用して必要なポートを開き、ファイアウォール設定を再読み込みします。#
firewall-cmd --permanent --add-service=samba
#firewall-cmd --reload
smb
サービスを再起動します。#
systemctl restart smb