Skip to content

Commit

Permalink
BUG: fix logrotate ownership options
Browse files Browse the repository at this point in the history
The packaged configuration for logrotate falsely contained options applying to other programs' log files. This caused wrong ownerships of log files.
This issues is corrected, but the ownership of affected log files may need to be changed manually.
To find affected files, you may use:
```bash
sudo find /var/log/ -user intelmq ! -path \*intelmq\*
```

fixes #2110
  • Loading branch information
Sebastian Wagner committed Sep 14, 2021
1 parent e3cfac7 commit 5c96cb1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ CHANGELOG
### Tools

### Contrib
- logrotate: Move compress and ownership rules to the IntelMQ-blocks to prevent that they apply to other files (PR#2111 by Sebastian Wagner, fixes #2110).

### Known issues

Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ The field names for all data added to messages must match a pre-defined format.
The check which ensures this, was ineffective prior to this version and is effective again starting with version 3.1.0.
The [Data format documentation](https://intelmq.readthedocs.io/en/maintenance/dev/data-format.html#rules-for-keys) describes the required format.

### Logrotate
The packaged configuration for logrotate falsely contained options applying to other programs' log files. This caused wrong ownerships of log files.
This issues is corrected, but the ownership of affected log files may need to be changed manually.
To find affected files, you may use:
```bash
sudo find /var/log/ -user intelmq ! -path \*intelmq\*
```

### Configuration

### Libraries
Expand Down
10 changes: 6 additions & 4 deletions contrib/logrotate/intelmq
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
compress
delaycompress
create 644 intelmq intelmq

/opt/intelmq/var/log/*.log {
su intelmq intelmq
daily
maxsize 10M
rotate 60
notifempty
compress
delaycompress
create 644 intelmq intelmq
sharedscripts
postrotate
sudo -u intelmq /usr/local/bin/intelmqctl --quiet reload
Expand All @@ -20,6 +19,9 @@ create 644 intelmq intelmq
maxsize 10M
rotate 60
notifempty
compress
delaycompress
create 644 intelmq intelmq
sharedscripts
postrotate
sudo -u intelmq /usr/local/bin/intelmqctl --quiet reload file-output
Expand Down

0 comments on commit 5c96cb1

Please sign in to comment.