Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Flume running user #52

Closed
jucaf opened this issue Mar 24, 2014 · 1 comment
Closed

Flume running user #52

jucaf opened this issue Mar 24, 2014 · 1 comment

Comments

@jucaf
Copy link
Member

jucaf commented Mar 24, 2014

Flume run as flume user, which forbid read permission to some log files. Flume should require to run as root user to have unrestricted access to all log files.
Possibles workarounds:

  1. Modify FLUME_USER in /etc/init.d/flume-agent to root
  2. Delete $FLUME_USER variable in line 90 in /etc/init.d/flume-agent "/bin/su -s /bin/bash -c "/bin/bash -c 'echo $$ >${FLUME_PID_FILE} && exec ${EXEC_PATH} agent --conf $FLUME_CONF_DIR --conf-file $FLUME_CONF_FILE --name $FLUME_AGENT_NAME >>${FLUME_LOG_DIR}/flume-agent.out 2>&1' & $FLUME_USER"
@jucaf
Copy link
Member Author

jucaf commented Mar 24, 2014

In order to allow flume read audit.log (and some other root read only file) without running flume as it is required to add in /etc/sudoers
Defaults:flume !requiretty
flume ALL=(root) NOPASSWD: /usr/bin/tail -F /var/log/audit/audit.log

And in flume.conf
agent.sources.tailFile.command = sudo tail -F /var/log/audit/audit.log

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants