Streamline your workflow with the new MCP server for Red Hat product documentation.Connect your AI tools and LLMs directly to live Red Hat product documentation. Connect now. 4.4. 権限のない SELinux ユーザーの非標準共有ディレクトリーへのアクセスを管理する 対応する SELinux ファイルタイプを見つけてマッピングすることで、汎用の権限のない SELinux ユーザー user_u の非標準共有ディレクトリーへのアクセスを設定できます。user_u ユーザーには、デフォルトのロール user_r とデフォルトのドメイン user_t が付与されています。 前提条件 selinux-policy-doc および setools-console パッケージがシステムにインストールされている。 手順 ターミナルで user_selinux(8) man ページを開きます。 $ man user_selinux MANAGED FILES セクションで、お客様の状況に合った属性またはタイプを見つけます。たとえば、user_home_type 属性です。 オプション: 属性に割り当てられているすべてのタイプをリスト表示するには、-x および -a オプションを指定した seinfo コマンドを使用します。次に例を示します。 $ seinfo -x -a user_home_type Type Attributes: 1 attribute user_home_type; … chrome_sandbox_home_t config_home_t cvs_home_t data_home_t dbus_home_t fetchmail_home_t gconf_home_t git_user_content_t … 対応するタイプの候補 (この例では data_home_t タイプ) を特定したら、その SELinux マッピングを確認します。 $ semanage fcontext -l | grep data_home_t … /root/\.local/share(/.*)? all files system_u:object_r:data_home_t:s0 … 対応するタイプを、user_u からアクセス可能にするディレクトリー (例: /shared-data) にマップします。 $ semanage fcontext -a -t data_home_t '/shared-data(/.*)?' 検証 設定したディレクトリーのマッピングを確認します。 # semanage fcontext -l | grep "shared-data" /shared-data(/.*)? all files system_u:object_r:data_home_t:s0 user_u SELinux ユーザーにマップされた Linux ユーザーとしてログインし、ディレクトリーにアクセスできることを確認します。 戻る次へ