mod_log_chat ubuntu 16.04.1 LTS open log file Cannot write into file

2017-01-01 20:42:50.545 [error] <0.489.0>@mod_log_chat:open_logfile:178 Cannot write into file /var/www/html/jus/current/2017-01-01

What permissions to set?

It depends on whether you are

It depends on whether you are using ejabberd from the version offered in the repositories or not.

If you are, it is installed in /var/lib/ejabberd. The default configuration for mod_log_chat, if it comes from the ejabberd-mod-log-chat package, should be copied from /usr/share/doc/ejabberd-mod-log-chat/conf/mod_log_chat.yml to /etc/ejabberd/modules.d.

After a bit of experimenting, I found out that /var/lib/ejabberd, the default path if no one is set in the module configuration file, works very well with no errors. Other paths fail, even if the owner of the folder and its group are both changed to ejabberd, or the permissions are set accordingly.

Fortunately, any subfolder inside /var/lib/ejabberd will work as well. It's just a matter of editing the config file so that path is set to a subfolder of /var/lib/ejabberd, and that such subfolder exists and is owned by the user ejabberd and the group of the same name.

I hope this works for you as much as it did for me.
Regards! :D

Syndicate content