mkdir /files
touch /files/files{0..10}
semanage fcontext -a -t public_content_t "/files(/.*)?"
restorecon -v -R /files
semanage fcontext -a -t public_content_rw_t "/files(/files.*)?"
restorecon -v -R /files
Um erro:
/files not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files10 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files8 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files5 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files4 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files9 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files0 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files7 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files1 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files3 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files2 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
/files/files6 not reset as customized by admin to unconfined_u:object_r:public_content_t:s0
Eu
ls -Z /files:
Saída:
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0
0 Aug 30 00:47 files0
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0 0 Aug 30 00:47 files1
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0 0 Aug 30 00:47 files10
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0 0 Aug 30 00:47 files2
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0 0 Aug 30 00:47 files3
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0 0 Aug 30 00:47 files4
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0 0 Aug 30 00:47 files5
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0 0 Aug 30 00:47 files6
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0 0 Aug 30 00:47 files7
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0 0 Aug 30 00:47 files8
-rw-r--r--. 1 root root unconfined_u:object_r:public_content_t:s0 0 Aug 30 00:47 files9
Ao restaurar o contexto, você deseja usar o
-F
sinalizador:Você pode tentar novamente com:
Deveria funcionar.