1234f13bf22415e09185d38e71913a4ccd58d904
Linux/SELinux.md
... | ... | @@ -270,7 +270,7 @@ sub sortInBracket |
270 | 270 | - Apacheで新規ディレクトリや新規ファイルを作成する必要がある場合は、書き込まれるディレクトリに対してパーミッション設定に加えてfcontext設定が必要。<br>その際、パスはフルパスで指定すること。<br>[SELinux コンテキスト: ファイルのラベル付け](https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/selinux_users_and_administrators_guide/sect-security-enhanced_linux-working_with_selinux-selinux_contexts_labeling_files#sect-Security-Enhanced_Linux-SELinux_Contexts_Labeling_Files-Persistent_Changes_semanage_fcontext)
|
271 | 271 | ```
|
272 | 272 | # chmod 777 /var/www/vh1-html/Service1/store/
|
273 | - # semanage fcontext -a -t httpd_sys_rw_content_t /var/www/vh1-html/Service1/store/
|
|
273 | + # semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/vh1-html/Service1/store/(.*)"
|
|
274 | 274 | # restorecon -vR /var/www/vh1-html/Service1/store/
|
275 | 275 | ```
|
276 | 276 |