@@ -225,7 +225,7 @@ bundle agent cfe_internal_permissions
225225
226226 !(policy_server|am_policy_hub)::
227227 "$(sys.statedir)/." -> { "ENT-4773" }
228- perms => system_owned( "0600" ),
228+ perms => state_dir_system_owned( ),
229229 # Important to recurse across file system boundaries, as databases and or state are commonly on different filesystems
230230 depth_search => recurse_with_base( inf ),
231231 file_select => all;
@@ -237,7 +237,7 @@ bundle agent cfe_internal_permissions
237237 comment => "The database user must be able to read the parent directory of the database or it won't be accessible";
238238
239239 "$(sys.statedir)/."
240- perms => mog("0600", "root", "root" ),
240+ perms => state_dir_system_owned( ),
241241 depth_search => recurse_except( inf, "pg" ),
242242 file_select => all,
243243 comment => "The database user must be able to read the parent directory of the database or it won't be accessible";
@@ -362,3 +362,23 @@ body depth_search cfe_internal_docroot_application_perms
362362 depth => "inf";
363363 exclude_dirs => { "logs" };
364364}
365+
366+ ############################################################################
367+
368+ body perms state_dir_system_owned
369+ {
370+ mode => "0600";
371+ owners => { "root" };
372+
373+ freebsd|openbsd|netbsd|darwin::
374+ groups => { "wheel" };
375+
376+ aix::
377+ groups => { "system" };
378+
379+ hpux::
380+ groups => { "sys" };
381+
382+ !(freebsd|openbsd|netbsd|darwin|aix|hpux)::
383+ groups => { "root" };
384+ }
0 commit comments