[BUG] Roundcube Webmail Can Not Write Logs Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
SCelik

[BUG] Roundcube Webmail Can Not Write Logs  Topic is solved

Postby SCelik » Mon Sep 28, 2015 10:25 pm

I think roundcube openbasedir directives is missing for logging directory. A lot of errors logged becouse of this and roundcube can not write logs.

[Tue Sep 29 01:24:23 2015] [error] [client 176.40.196.205] PHP Warning: ini_set(): open_basedir restriction in effect. File(/var/log/roundcubemail//errors) is not within the allowed path(s): (/home/admin/web:/home/admin/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/usr/share/phpMyAdmin/config:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube) in /usr/share/roundcubemail/program/lib/Roundcube/rcube_config.php on line 258

Felix
Posts: 101
Joined: Tue Aug 04, 2015 7:15 pm

Re: [BUG] Roundcube Webmail Can Not Write Logs

Postby Felix » Wed Sep 13, 2017 8:55 am

Thanks SCelik for posting that info. I had the same problem and managed to solve it using your input.

I'd like to add some more info.

In the default VESTA setup in Ubuntu 14.04 and 16.04, the directory /var/log/roundcube is owned by www-data and belogns to group adm. But in this setup, I needed to set RW permissions to Others for logging to work. So I set www-data (Owner) and admin (Group) with no permissions to others. I think it's also worth mentioning that the domain https://[server-FQDN]/roundcube belongs to VESTA user admin.

In order to be able to identify users logging in to fight spam if/when needed, I also enabled some more Roundecube logging in /etc/roundcube/main.inc.php:

Code: Select all

// Log successful logins to <log_dir>/userlogins or to syslog
$rcmail_config['log_logins'] = true;

// Log session authentication errors to <log_dir>/session or to syslog
$rcmail_config['log_session'] = true;


and created the relevant files. The above setup is working fine for my needs :)

Felix
Posts: 101
Joined: Tue Aug 04, 2015 7:15 pm

Re: [BUG] Roundcube Webmail Can Not Write Logs

Postby Felix » Thu Sep 14, 2017 6:00 am

And since we're looking at Roundcube, it would be a good idea to configure Roundcube to use SMTP and NOT php mail()


If this option is left blank, the PHP mail() function is used to send emails. We don't recommend this because mail() suffers of some limitations and doesn't restrict sending to authenticated users only.


Here is another reason why.


Return to “Web Server”



Who is online

Users browsing this forum: Bing [Bot] and 7 guests