Description of problem: Issue happened while running docker-compose I believe SELinux is preventing sh from 'read' accesses on the file openboxes-run.sh. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that sh should be allowed read access on the openboxes-run.sh file by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # ausearch -c 'sh' --raw | audit2allow -M my-sh # semodule -X 300 -i my-sh.pp Additional Information: Source Context system_u:system_r:container_t:s0:c53,c753 Target Context unconfined_u:object_r:user_home_t:s0 Target Objects openboxes-run.sh [ file ] Source sh Source Path sh Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-36.14-1.fc36.noarch Local Policy RPM selinux-policy-targeted-36.14-1.fc36.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 5.19.8-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 8 19:02:21 UTC 2022 x86_64 x86_64 Alert Count 1 First Seen 2022-09-11 16:11:31 EEST Last Seen 2022-09-11 16:11:31 EEST Local ID 71c0de21-aec7-4c6c-a02e-0fb31908ecaa Raw Audit Messages type=AVC msg=audit(1662901891.916:701): avc: denied { read } for pid=22558 comm="sh" name="openboxes-run.sh" dev="dm-3" ino=24818132 scontext=system_u:system_r:container_t:s0:c53,c753 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=0 Hash: sh,container_t,user_home_t,file,read Version-Release number of selected component: selinux-policy-targeted-36.14-1.fc36.noarch Additional info: component: selinux-policy reporter: libreport-2.17.2 hashmarkername: setroubleshoot kernel: 5.19.8-200.fc36.x86_64 type: libreport
I believe there is some selinux relabeling needed when running docker-compose according to https://github.com/openboxes/openboxes-docker
Alexander, Can you put down some details or reproducer? Container should not be allowed to access data outside.
This is not a bug. It is expected the directory must be labeled for SELinux access. chcon -t container_file_t -r on the volume being mounted into the container.
If the directory is not private to the container then you might need to disable SELinux for the run of the container.
chcon -R worked, thank you! Just for anybody that reads, the `-r` above is a typo and should be `-R`.