ubuntu 14.04 - Unable to run logstash config file (permission denied) -
my config file stored in
/etc/logstash/
and ran command
$ /etc/logstash -f /etc/logstash/logstash.conf
as root.
however, told me permission denied when tried that. there way solve this?
as said, need run /opt/logstash/bin/logstash -f /etc/logstash/logstash.conf
instead of /etc/logstash -f /etc/logstash/logstash.conf
.
this caused default directory structure of linux system logstash uses put files in. wikipedia: filesystem hierarchy standard
/opt stands optional
, contains third party packages not part of default linux distribution. therefore logstash puts binaries , dependencies there (e.g. jruby stuff). here can find logstash program /opt/logstash/bin/logstash
or plugin manager /opt/logstash/bin/plugin
.
/etc means et cetera
, used configuration files (like logstash uses it).
there other system folders used logstash. example /var/log/logstash
can find logstash's own logs. so, when run logstash installation (in ubuntu perhaps apt-get
or dpkg
) puts needed files in folders corresponding directory structure of os.
as see, cannot run /etc/logstash -f /etc/logstash/logstash.conf
because /etc/logstash
not executable directory.
however, if run logstash in command prompt may specify other paths config file (e.g. /opt/logstash/bin/logstash -f /home/user/logstash.conf
). if run service cannot provide path config file. default behaviour of logstash config files in /etc/logstash/
Comments
Post a Comment