1

Topic: Roundcube DB access errors

==== Required information ====
- iRedMail version: 0.8.6 > 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Linux/BSD distribution name and version: Centos 6.5, Linux 3.14.4-x86_64-linode40 on x86_64
- Related log if you're reporting an issue: maillog
====

I don't notice any issues when using Roundcube, but today I noticed these syslog entries (maillog):

mail roundcube: DB Error: [7] ERROR:  permission denied for relation cache_shared (SQL Query: DELETE FROM cache_shared WHERE expires < now()) in /var/www/roundcubemail-0.9.5/program/lib/Roundcube/rcube_db.php on line 465 (POST /mail/?_task=mail&_framed=1&_action=headers?_task=&_action=)

May 17 11:10:43 mail roundcube: DB Error: [7] ERROR:  permission denied for relation cache_shared (SQL Query: DELETE FROM cache_shared WHERE expires < now()) in /var/www/roundcubemail-0.9.5/program/lib/Roundcube/rcube_db.php on line 465 (GET /mail/?_task=mail&_action=getunread&_remote=1&_unlock=0&_=1400339444923)

These are sporadically dispersed throughout the log. What is the cause and can (or does it need to be) corrected? I presume the roundcube db user can't perform the action necessary on the cache_shared table in the roundcubemail db.

Please note that although in the log file the folder name end '0.9.5', I am in fact running v1.0.0. I just used the same folder and never renamed it when i updated it.

Let me know if you need the full maillog file. Thanks.

- Fabian S.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Roundcube DB access errors

I also noted that the appearance of these errors seems to coincide with my update to RCmail v1.0.0. I updated from the version installed alongside iRedmail v0.8.6 by default on my centos box.

3

Re: Roundcube DB access errors

I am now fully updated to the latest iredadmin pro and iredmail v0.8.7 and postgresql v9.1. i will monitor my logs to see if these errors go away.

one other thing; when i looked around in phppgadmin, i couldn't see that any of the system component db users (roundcube, amavisd, etc...) had any rights granted to them for their respective DB's. i went ahead and granted them. we'll see what that does. can you offer any insight into this? Thanks.

- Fabian S.

4

Re: Roundcube DB access errors

Nope, problem still occurs:

May 17 21:24:58 mail roundcube: DB Error: [7] ERROR:  permission denied for relation cache_shared (SQL Query: DELETE FROM cache_shared WHERE expires < now()) in /var/www/roundcubemail-0.9.5/program/lib/Roundcube/rcube_db.php on line 465 (GET /mail/?_task=mail&_mbox=INBOX&_folderlist=1&_quota=1&_list=1&_uids=165%2C167%2C169%2C186%2C207%2C211&_last=1400376240&_action=refresh&_remote=1&_unlock=loading1400376300724&_=1400374740334)
Last

Seems spread out by hours at a time and related to some sort of cache in the database RC is having trouble clearing after it expires. Any thoughts?

- Fabian S.

5

Re: Roundcube DB access errors

i think i got it to work. i had to set grant all permissions to rc db user to the rc db. i couldn't grant all before i upgraded to v9.1.

6

Re: Roundcube DB access errors

nevermind, i take that back. it's still occurring.

7

Re: Roundcube DB access errors

Try this:

pgsql> \c roundcubemail;
pgsql> GRANT CREATE,SELECT,INSERT,UPDATE,DELETE ON cache,cache_index,cache_messages,cache_thread,contactgroupmembers,contactgroups,contacts,dictionary,identities,searches,session,users TO roundcube;
pgsql> GRANT CREATE,SELECT,UPDATE,USAGE ON contacts_seq,contactgroups_seq,identities_seq,searches_seq,users_seq TO roundcube;

8

Re: Roundcube DB access errors

Sorry, both statements produce the following error:

ERROR:  invalid privilege type CREATE for relation

9

Re: Roundcube DB access errors

My mistake. Please remove 'CREATE,' and try again.

10

Re: Roundcube DB access errors

they seemed to have worked. they reported back GRANT

i'll watch the logs over tomorrow and will report back what I see. thanks.

11

Re: Roundcube DB access errors

i haven't seen the error re-occur again so this may be resolved. but i also haven't used RC as lot so maybe this weekend i'll exercise it. thanks for your help.

12

Re: Roundcube DB access errors

Please create a new forum topic if it re-occurs.