vim /etc/systemd/system/logstash.service
User=logstash
Group=logstash
/etc/logstash/conf.d/nginx.conf
it is not work well
but
vim /etc/systemd/system/logstash.service
User=root
Group=root
it is work well
access.log user :nginx group:nginx
vim /etc/systemd/system/logstash.service
User=logstash
Group=logstash
/etc/logstash/conf.d/nginx.conf
it is not work well
but
vim /etc/systemd/system/logstash.service
User=root
Group=root
it is work well
access.log user :nginx group:nginx
Show ls -l
output for the logfile in question as well as all directories leading up to it.
[root@bogon ~]# ll /var/log/nginx/access.log
-rw-rw-r--. 1 nginx nginx 23406 10月 16 17:20 /var/log/nginx/access.log
And what about /var, /var/log, and /var/log/nginx?
drwx------. 2 nginx nginx 159 10月 16 09:16 nginx
drwxr-xr-x. 13 root root 4096 10月 16 09:16 log
The nginx directory is clearly only accessible to the nginx user. The logstash user needs the executable bit set (possibly also the read bit depending on how the wildcard expansion has been implemented).
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.