Closed utzer closed 3 days ago
Hello,
Well the fix might be probably to add something like this here
chmod u=rwX,g=rX,o= -R /var/log/matrix-"$app"
Can you check if with this permission the issue is solved ?
Hello, sorry I did not respond so long, I don't think setting the logs permission is the issue, but running logrote with that permission is what would solve the problem.
Changing the permission of the log file to something other than synapse:root did in the past cause a crash for synapse, the log file permission has been set incorrectly during an update some months back.
I guess this applies ynh_use_logrotate [--logfile=/log/file] [--specific_user=user/group]
, especially the last part [--specific_user=user/group]. This is from here.
Maybe it is enough to remove logrotate config once during an update and then add it again with the correct user/group.
The log
/var/log/matrix-synapse/homeserver.log
and/var/log/matrix-synapse/turnserver.log
are not rotated, so after some time thehomeserver.log
grows to a really big size.As a mitigation I tried to run logrotate for matrix-synapse, by executing
logrotate /etc/logrotate.d/synapse
, which returned this:The permissions of the folder
/var/log/matrix-synapse
are set strangely, but I assume this is some kind of upstream problem, permissions are:drwxrwxrwx+ 1 synapse root 88 May 7 17:55 matrix-synapse/
The logrotate config
/etc/logrotate.d/synapse
looks like this:I added these lines:
New files looks like this:
Please add this fix, if it was not already fixed.