#1871 Unable to log to stdout in json format as non root user
Reporter
anirban das
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Component-Community
Status-NeedInfo
Priority-Medium
Type-Defect
anirban das
on
What steps will reproduce the problem?
1. use latest version of mod_log_json module
2. enable mod_log_json module in global modules
3. configure logging in main prosody.cfg.lua
log = {
{
levels = {
min = "debug"
},
to = "json"
, formatted_as = "msg_formatted"
, filename = "/dev/stdout"
};
}
What is the expected output?
{"source":"storagemanager","level":"debug","msg_formatted":"map storage driver unavailable, using shim on top of keyval store.","message":"map storage driver unavailable, using shim on top of keyval store.","args":[],"datetime":"2024-07-17T15:53:25Z"}
What do you see instead?
One of more of the Prosody log files are not writeable, please correct the errors and try starting prosodyctl again.
/dev/stdout: Permission denied
What version of the product are you using? On what operating system?
Prosody version 0.12.4, debian OS
Please provide any additional information below.
running prosody as non root user
What steps will reproduce the problem? 1. use latest version of mod_log_json module 2. enable mod_log_json module in global modules 3. configure logging in main prosody.cfg.lua log = { { levels = { min = "debug" }, to = "json" , formatted_as = "msg_formatted" , filename = "/dev/stdout" }; } What is the expected output? {"source":"storagemanager","level":"debug","msg_formatted":"map storage driver unavailable, using shim on top of keyval store.","message":"map storage driver unavailable, using shim on top of keyval store.","args":[],"datetime":"2024-07-17T15:53:25Z"} What do you see instead? One of more of the Prosody log files are not writeable, please correct the errors and try starting prosodyctl again. /dev/stdout: Permission denied What version of the product are you using? On what operating system? Prosody version 0.12.4, debian OS Please provide any additional information below. running prosody as non root user
Thanks for the report This should already be fixed in https://hg.prosody.im/prosody-modules/rev/0b347a7c5b5f Please double check that you have the latest version.
ChangesI am using the latest version of the module
If it helps, the error only occurs when prosody is not running as root user as I mentioned in my report