[SOLVED]Logfiles with root user/group on Raspberry os
-
Hi,
I am running the docker version of MSR (21332) on raspberry pi OS along with a Home assistant supervised (Docker). I used to be on HAAS OS.
Most of the MSR installation files are using the pi user/group except some file here and there where root user/group is used. This is not causing any functional issue that I am aware of except for the log files. When I SSH into the raspberry file (using the pi user) I can use the sudo command to look at the logs no problem however normally I do the configuration and log inspection via SAMBA. For some reason all logs have the root user and group and security set to 640 (read /write for user root and read for root group). Therefore SAMBA, using the user pi cannot access the logs. I tried changing the user/group and permission but when the log are re-written (when full) it comes back to root.
I played with the permission on log.2,3,4,5 in the example above.
Is that the normal behaviour or something is wrong in my setup?
Can the permission be relaxed a bit to say 644? that would give the pi user read access.
Thanks in advance.
-
Hi,
I am running the docker version of MSR (21332) on raspberry pi OS along with a Home assistant supervised (Docker). I used to be on HAAS OS.
Most of the MSR installation files are using the pi user/group except some file here and there where root user/group is used. This is not causing any functional issue that I am aware of except for the log files. When I SSH into the raspberry file (using the pi user) I can use the sudo command to look at the logs no problem however normally I do the configuration and log inspection via SAMBA. For some reason all logs have the root user and group and security set to 640 (read /write for user root and read for root group). Therefore SAMBA, using the user pi cannot access the logs. I tried changing the user/group and permission but when the log are re-written (when full) it comes back to root.
I played with the permission on log.2,3,4,5 in the example above.
Is that the normal behaviour or something is wrong in my setup?
Can the permission be relaxed a bit to say 644? that would give the pi user read access.
Thanks in advance.
@vezinpi As it happens, 21332 addressed this. Add
mode
to yourlogging.yaml
config for thereactor.log
file stream (and any other file streams you may have): -
I saw the note WRT to logging and the "mode" in the release notes for 21331 but did not really understand at the time what it was all about.
As suggested above I added mode: 0666 to the logging.yaml, deleted the old logs, restarted MSR and the reactor.log do not have 0666 but 0644 as below. That being said, it is good enough for me but tought you should know.
Thanks
-
That problem is likely the process's umask being applied, and that can't be controlled from within Reactor.
-
T toggledbits locked this topic on