210e4a979ba239ed5b38d40581bf926c12be35f4
Linux/SELinux.md
... | ... | @@ -251,6 +251,11 @@ sub sortInBracket |
251 | 251 | ```
|
252 | 252 | # chcon -R -t httpd_sys_script_exec_t <ディレクトリ>
|
253 | 253 | ```
|
254 | +- シンボリックリンクに対してコンテキストの変更を行うと、デフォルトではリンク先のコンテキストが変更される。
|
|
255 | +シンボリックリンク自体のコンテキストを変更するには「--no-dereference」を指定する。
|
|
256 | +```
|
|
257 | +# chcon --no-dereference -t httpd_sys_script_exec_t <シンボリックリンク>
|
|
258 | +```
|
|
254 | 259 | - コンテキスト確認
|
255 | 260 | ```
|
256 | 261 | # ls -lZ
|