beats icon indicating copy to clipboard operation
beats copied to clipboard

[Docs] Update logging.files.permissions documentation to consider umask

Open ycombinator opened this issue 6 years ago • 8 comments

Based on the discussion at https://discuss.elastic.co/t/rotated-log-files-have-incorrect-permissions/244623.

After the changes done in https://github.com/elastic/beats/pull/14119 to resolve https://github.com/elastic/beats/issues/14005, the documentation about the logging.files.permissions setting at https://www.elastic.co/guide/en/beats/filebeat/current/configuration-logging.html#_logging_files_permissions and the example in https://www.elastic.co/guide/en/beats/filebeat/current/configuration-logging.html#configuration-logging could use an update.

ycombinator avatar Aug 13 '20 10:08 ycombinator

Pinging @elastic/integrations-services (Team:Services)

elasticmachine avatar Aug 17 '20 08:08 elasticmachine

Pinging @elastic/obs-docs (Team:Docs)

elasticmachine avatar Aug 24 '20 07:08 elasticmachine

Adding a +1 here since the missing info in the docs can lead to lots of confusion currently.

acrewdson avatar Oct 01 '20 17:10 acrewdson

I hit this, for me is weird that you can set permissions on a parameter and those permissions will not be applied as configured, if I set 0664, the others have not permissions, and the group has not write permission due to the creation mask. So the last digit is ignored no matter the value, and the group will not have write permissions ever, I wonder if apply a mask make sense if you are setting explicit permissions.

kuisathaverat avatar Jan 05 '21 13:01 kuisathaverat

A customer hit the issue. https://elastic.my.salesforce.com/ui/support/servicedesk/ServiceDeskPage#/5004M00000i8yaa

hisashinz avatar Jul 13 '21 09:07 hisashinz

Pinging @elastic/agent (Team:Agent)

elasticmachine avatar Aug 04 '21 17:08 elasticmachine

I too have hit this problem. I am using heartbeat to monitor some websites and writing the results to a file. I have specified permissions on the output to 0604 but the "other" permissions are not being applied. I can understand the purpose of the change was that files shouldn't be created by default to grant public permissions but the way it has been implemented is that even if I specifically state that I want public permissions this cannot be achieved. Seems like madness to me. Rather than using a umask value (which prevents other access) wouldn't it be simpler to set the default to not grant other - then if we specify other permissions on a individual file they should be applied. In the mean time I have seen this webpage (https://github.com/elastic/beats/pull/14119) that states: An individual Beat may choose to override this default umask via the libbeat/cmd/instance.Settings.Umask field. I am not a unix expert - can someone explain how this is done???

KeithGHarding avatar Aug 24 '21 22:08 KeithGHarding

I also have this problem, how can i fix it? for auditbeat 7.17.1 and also with 7.17.8 on CENTOS 7

I need to set right permission for monitor log with zabbix. to know when beat stop work or sending data to Elastic.

mandrick91 avatar Dec 23 '22 10:12 mandrick91