Skip to content

Commit

Permalink
RPM: fixed attrs for conf.d dirs (netdata#15828)
Browse files Browse the repository at this point in the history
* RPM: fixed attrs for conf.d dirs

go.d.plugin can't load module default configuration, cause
conf files are inaccessible with `netdata` user

```bash
[netdata@host conf.d]$ stat go.d/chrony.conf
stat: cannot statx 'go.d/chrony.conf': Permission denied
```

* Set defattr directory permissions to 0755

(cherry picked from commit d20fe0c)
  • Loading branch information
k0ste authored and stelfrag committed Aug 23, 2023
1 parent e633c54 commit 8b11c8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions netdata.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ fi
%{_libexecdir}/%{name}/plugins.d/charts.d.plugin
%{_libexecdir}/%{name}/plugins.d/charts.d.dryrun-helper.sh
%{_libexecdir}/%{name}/charts.d/
%defattr(0644,root,netdata,0644)
%defattr(0644,root,netdata,0755)
%{_libdir}/%{name}/conf.d/charts.d.conf
%{_libdir}/%{name}/conf.d/charts.d/

Expand Down Expand Up @@ -721,7 +721,7 @@ fi
%files plugin-ebpf
%defattr(4750,root,netdata,4750)
%{_libexecdir}/%{name}/plugins.d/ebpf.plugin
%defattr(0644,root,netdata,0644)
%defattr(0644,root,netdata,0755)
%{_libdir}/%{name}/conf.d/ebpf.d.conf
%{_libdir}/%{name}/conf.d/ebpf.d

Expand Down Expand Up @@ -776,7 +776,7 @@ fi
%defattr(0750,root,netdata,0750)
%{_libexecdir}/%{name}/plugins.d/python.d.plugin
%{_libexecdir}/%{name}/python.d
%defattr(0640,root,netdata,0640)
%defattr(0644,root,netdata,0755)
%{_libdir}/%{name}/conf.d/python.d.conf
%{_libdir}/%{name}/conf.d/python.d

Expand Down Expand Up @@ -806,7 +806,7 @@ fi
# CAP_NET_ADMIN needed for WireGuard collector
# CAP_NET_RAW needed for ping collector
%caps(cap_net_admin,cap_net_raw=eip) %{_libexecdir}/%{name}/plugins.d/go.d.plugin
%defattr(0644,root,netdata,0644)
%defattr(0644,root,netdata,0755)
%{_libdir}/%{name}/conf.d/go.d.conf
%{_libdir}/%{name}/conf.d/go.d

Expand All @@ -829,7 +829,7 @@ fi
%defattr(0750,root,netdata,0750)
# CAP_DAC_READ_SEARCH and CAP_SYS_PTRACE needed for data collection by the plugin.
%caps(cap_dac_read_search,cap_sys_ptrace=ep) %{_libexecdir}/%{name}/plugins.d/apps.plugin
%defattr(0644,root,netdata,0644)
%defattr(0644,root,netdata,0755)
%{_libdir}/%{name}/conf.d/apps_groups.conf

%package plugin-slabinfo
Expand Down

0 comments on commit 8b11c8e

Please sign in to comment.