Description of problem: SELinux is preventing mariadbd from 'search' accesses on the directory net. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that mariadbd should be allowed search access on the net directory 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 'mariadbd' --raw | audit2allow -M my-mariadbd # semodule -X 300 -i my-mariadbd.pp Additional Information: Source Context system_u:system_r:mysqld_t:s0 Target Context system_u:object_r:sysctl_net_t:s0 Target Objects net [ dir ] Source mariadbd Source Path mariadbd Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-38.17-1.fc38.noarch Local Policy RPM mysql-selinux-1.0.5-3.fc38.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 6.3.8-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 15 02:15:40 UTC 2023 x86_64 Alert Count 22 First Seen 2023-04-15 13:59:39 EDT Last Seen 2023-07-08 16:13:42 EDT Local ID 81b23eb7-79bb-4070-94f3-208998c1eebd Raw Audit Messages type=AVC msg=audit(1688847222.756:17470): avc: denied { search } for pid=1379 comm="mariadbd" name="net" dev="proc" ino=18692 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=0 Hash: mariadbd,mysqld_t,sysctl_net_t,dir,search Version-Release number of selected component: selinux-policy-targeted-38.17-1.fc38.noarch Additional info: reporter: libreport-2.17.10 package: selinux-policy-targeted-38.17-1.fc38.noarch component: mysql-selinux hashmarkername: setroubleshoot type: libreport reason: SELinux is preventing mariadbd from 'search' accesses on the directory net. kernel: 6.3.8-200.fc38.x86_64 component: mysql-selinux Potential duplicate: bug 2186996
Created attachment 1974816 [details] File: description
Created attachment 1974817 [details] File: os_info
Hello, could you please describe your intention or use-case, that led you to this situation? Because I'd guess that the 'mariadbd' would likely want not only to 'search' the directory, but also operate on the files inside. A description or reproducer would help me understand what's going on and fix the SELinux rules in more accurate way.
Cause is unknown. I don't do anything special other than access the db across the network.