-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 permission denied #3752
Comments
Hello, How do you handle this error ? Because I've the same behavior, when I've a deferred, a directory is created with restricted right. |
Hopefully this would help, although my permissions looked correct, and running the test via root worked perfectly. These didn't take effect properly. sudo chgrp -R telegraf /var/spool/postfix/{active,hold,incoming,deferred} |
Yes this command help at time |
I believe the posix ACL method will handle newly created directories:
https://github.com/influxdata/telegraf/tree/master/plugins/inputs/postfix#permissions |
I was hoping posix will save my day but not (maybe i miss understood something)
and from Syslog |
Okay, for some reason my user in |
sudo setfacl -Rdm u:telegraf:rx /var/spool/postfix/{active,hold,incoming,deferred,maildrop} not enough permissions on directories above sudo setfacl -m u:telegraf:rx /var/spool/postfix |
Try running both of these setfacl calls from the plugin README:
|
@danielnelson correct lines is: |
If you have the leading |
@danielnelson Yes correct, with leading , telegraf stop complain abut new mails in deffered ou other Good lines tested - OK: sudo setfacl -m g:telegraf:rX /var/spool/postfix/{,active,hold,incoming,deferred,maildrop} Thank's @danielnelson |
Why not simply /var/spool/postfix then (for the second setfacl) as it's recursive. |
I think it is related to #3594 (comment) |
What I mean is that: equals: As we are passing the recursive flag on |
It seems like the commands we are recommending are based on our method using unix permissions where we didn't want to change the permissions of the maildrop directory. When doing this with Posix ACLs it seems like we could just set both of the ACLs only on Maybe we want:
|
@danielnelson confirmed ! Before: 2020-03-30T19:07:30Z E! [inputs.postfix] Error in plugin: error scanning /var/spool/postfix/maildrop: open /var/spool/postfix/maildrop: permission denied == AFTER ACL'S == sudo setfacl -Rm g:telegraf:rX /var/spool/postfix/ No complaints in Log :) |
@bdronneau Seems like certain sub folders under "Deferred" are being created with different permissions. |
Hi @derrickpark, |
Expected behavior:
Actual behavior:
Feb 5 11:47:30 mailrelay01 telegraf: 2018-02-05T11:47:30Z E! Error in plugin [inputs.postfix]: error scanning queue active: open /var/spool/postfix/active: permission denied
Feb 5 11:47:30 mailrelay01 telegraf: 2018-02-05T11:47:30Z E! Error in plugin [inputs.postfix]: error scanning queue hold: open /var/spool/postfix/hold: permission denied
Feb 5 11:47:30 mailrelay01 telegraf: 2018-02-05T11:47:30Z E! Error in plugin [inputs.postfix]: error scanning queue incoming: open /var/spool/postfix/incoming: permission denied
Feb 5 11:47:30 mailrelay01 telegraf: 2018-02-05T11:47:30Z E! Error in plugin [inputs.postfix]: error scanning queue maildrop: open /var/spool/postfix/maildrop: permission denied
Feb 5 11:47:30 mailrelay01 telegraf: 2018-02-05T11:47:30Z E! Error in plugin [inputs.postfix]: error scanning queue deferred/0: open /var/spool/postfix/deferred/0: permission denied
Additional info:
When I run the test config I receive the data in which I am expecting (root user) restart the daemon and it wont come up suggesting that there is a permission issue. I have added the user to the postfix group and still receive the same error. Any suggestion to resolve the permission issue?
The text was updated successfully, but these errors were encountered: