Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix permissions on potentially sensitive files in linux packaging scripts #2108

Merged
merged 1 commit into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tools/packaging/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@

chown -R aoc:aoc /opt/aws/aws-otel-collector/logs
chown -R aoc:aoc /opt/aws/aws-otel-collector/var
chown -R aoc:aoc /opt/aws/aws-otel-collector/etc
chmod 640 /opt/aws/aws-otel-collector/var/.config.yaml
chmod 640 /opt/aws/aws-otel-collector/etc/.env
chmod 640 /opt/aws/aws-otel-collector/etc/extracfg.txt
12 changes: 6 additions & 6 deletions tools/packaging/linux/build.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ cp -fa * ${RPM_BUILD_ROOT}
%dir /opt/aws/aws-otel-collector/bin
%dir /opt/aws/aws-otel-collector/doc
%dir /opt/aws/aws-otel-collector/etc
%dir %attr(-, aoc, aoc) /opt/aws/aws-otel-collector/logs
%dir %attr(-, aoc, aoc) /opt/aws/aws-otel-collector/var
%dir %attr(-, aoc, aoc) /opt/aws/aws-otel-collector/etc
%dir %attr(750, aoc, aoc) /opt/aws/aws-otel-collector/logs
%dir %attr(750, aoc, aoc) /opt/aws/aws-otel-collector/var
%dir %attr(750, aoc, aoc) /opt/aws/aws-otel-collector/etc

/opt/aws/aws-otel-collector/bin/aws-otel-collector
/opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl
/opt/aws/aws-otel-collector/bin/VERSION
/opt/aws/aws-otel-collector/LICENSE
/opt/aws/aws-otel-collector/RELEASE_NOTE
/opt/aws/aws-otel-collector/var/.config.yaml
/opt/aws/aws-otel-collector/etc/.env
/opt/aws/aws-otel-collector/etc/extracfg.txt
%attr(640, aoc, aoc) /opt/aws/aws-otel-collector/var/.config.yaml
%attr(640, aoc, aoc) /opt/aws/aws-otel-collector/etc/.env
%attr(640, aoc, aoc) /opt/aws/aws-otel-collector/etc/extracfg.txt

/etc/init/aws-otel-collector.conf
/etc/systemd/system/aws-otel-collector.service
Expand Down