Actions
Bug #32467
openhammer(1) bash completion spews errors over the command line - Failure to write hammer.log to the default location (/var/log/hamer/hammer.log)
Status:
New
Priority:
Normal
Assignee:
-
Category:
User experience
Target version:
-
Fixed in Releases:
Found in Releases:
In Kanboard:
Description
Community Support Posting: https://community.theforeman.org/t/hammer-log-file-location/23385
Problem: Default hammer log file location is in a system directory (/var/log/hammer/hammer.log) and not a per-user directory
Given that hammer(1) can and should have unprivileged users, this seems like a strange default log file location.
I can only produce this error once (without removing ~/.cache), as the process creates:
~/.cache/ ~/.cache/apipie_bindings ~/.cache/apipie_bindings/{FOREMAN_URL} ~/.cache/apipie_bindings/{FOREMAN_URL}/v2 ~/.cache/apipie_bindings/{FOREMAN_URL}/v2/{HEX_STRING}.en.json ~/.cache/hammer_completion.json
Reproduction Method:
rm -rf ~/.cache/ hammer disc{{Press Tab}}
So it happens when tab-completion needs to create the completion file.
Generated Error Message:
No permissions to create log dir /var/log/hammer. File /var/log/hammer/hammer.log not writeable, won't log anything to the file! environment command is deprecated and will be removed in one of the future versions. Please use puppet-environment command instead. report command is deprecated and will be removed in one of the future versions. Please use config-report command instead.
Expected outcome: Log files for hammer should be created within the user’s home directory, the actual location I leave to others to determine.
No data to display
Actions