1.9.3. Windows ACL を使用する共有の追加
/srv/samba/example/ ディレクトリーのコンテンツを共有し、Windows ACL を使用する example という名前の共有を作成できます。
手順
ディレクトリーが存在しない場合は作成します。以下に例を示します。
# 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ファイルを検証します。# testparmfirewall-cmdユーティリティーを使用して必要なポートを開き、ファイアウォール設定を再読み込みします。# firewall-cmd --permanent --add-service=samba# firewall-cmd --reloadsmbサービスを再起動します。# systemctl restart smb