Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postfix plugin permissions #3591

Closed
dynek opened this issue Dec 15, 2017 · 4 comments · Fixed by #3594
Closed

Postfix plugin permissions #3591

dynek opened this issue Dec 15, 2017 · 4 comments · Fixed by #3594
Labels
docs Issues related to Telegraf documentation and configuration descriptions
Milestone

Comments

@dynek
Copy link
Contributor

dynek commented Dec 15, 2017

Hello,

I'm running 1.5.0 and wanted to benefit from the Postfix plugin.
How did you guys (@phemmer ?) did it with telegraf running with telegraf user which doesn't have access to files owned by postfix in /var/spool/postfix?

Example:
Error in plugin [inputs.postfix]: error scanning queue active: open /var/spool/postfix/active: permission denied

Thanks

@danielnelson
Copy link
Contributor

What is the owner/group for this directory? Perhaps you can add the telegraf user to this group.

@dynek
Copy link
Contributor Author

dynek commented Dec 15, 2017

Well thing is Postfix is pretty picky about its friends and most directories/files are owned by himself, group(s) have no permissions.
See:

4 drwx------  2 postfix root     4096 Dec 16 00:20 active
4 drwx------  2 postfix root     4096 Nov 28 10:20 bounce

Was wondering how @phemmer did it on his machine? May try to change permissions, hopefully Postfix won't notice and complain, because that's a production machine :-)

@danielnelson danielnelson added the docs Issues related to Telegraf documentation and configuration descriptions label Dec 15, 2017
@danielnelson
Copy link
Contributor

Hmm, might need to chgrp and add group permissions. Once we determine the best way we should add some documentation.

@danielnelson danielnelson added this to the 1.5.1 milestone Dec 15, 2017
@phemmer
Copy link
Contributor

phemmer commented Dec 16, 2017

3 options I can see

  1. Run telegraf as root. This is what we do as we have telegraf monitoring a bunch of stuff you need root perms for.
  2. Set a filesystem ACL.
  3. Do a one time chmod+chgrp. I doubt postfix will modify the permissions after those directories have been created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Issues related to Telegraf documentation and configuration descriptions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants