Skip to content

Commit

Permalink
Update after-install.sh - fix log file permissions (elastic#5737)
Browse files Browse the repository at this point in the history
Update after-install.sh - fix log file permissions

When installing Logstash (after previous removal of the Logstash RPM), there is a chance that there are old log files without proper owner.
Running Logstash as service, it may want to append data to these log files. Consequently, the logstash service does not start because it doesn't have write permissions to that files. This patch sets the (new) user logstash to own these historic files.
  • Loading branch information
driegel authored and Suyog Rao committed Aug 9, 2016
1 parent d9fa4f2 commit f873901
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/centos/after-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
chown -R logstash:logstash /usr/share/logstash
chown logstash /var/log/logstash
chown -R logstash /var/log/logstash
chown logstash:logstash /var/lib/logstash
chmod 0644 /etc/logrotate.d/logstash
sed -i \
Expand Down
2 changes: 1 addition & 1 deletion pkg/debian/after-install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

chown -R logstash:logstash /usr/share/logstash
chown logstash /var/log/logstash
chown -R logstash /var/log/logstash
chown logstash:logstash /var/lib/logstash
chmod 755 /etc/logstash
chmod 0644 /etc/logrotate.d/logstash
Expand Down
2 changes: 1 addition & 1 deletion pkg/ubuntu/after-install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

chown -R logstash:logstash /usr/share/logstash
chown logstash /var/log/logstash
chown -R logstash /var/log/logstash
chown logstash:logstash /var/lib/logstash
chmod 0644 /etc/logrotate.d/logstash
sed -i \
Expand Down

0 comments on commit f873901

Please sign in to comment.