[rt-users] postgres permission denied

Thomas Krichel krichel at openlib.org
Wed Jan 29 15:33:41 EST 2014


  Kevin Falcone writes
> On Wed, Jan 29, 2014 at 05:39:00PM +0000, Thomas Krichel wrote:
> > postgres=# grant all on database rtdb to rtuser;
> > GRANT
> > postgres=# ALTER DEFAULT PRIVILEGES GRANT ALL ON TABLES TO rtuser;
> > ALTER DEFAULT PRIVILEGES
> 
> These don't seem like they would touch sequences.
> 
> I'd be inspecting the output of \z topics, and \z on the sequences
> that are affected.

 \z showed no sequences. So I ran a

postgres at rt:~$ cat /usr/share/request-tracker4/etc/schema.Pg | psql

  \z then showed a bunch of sequeneces. But the rt-setup-database did
  issued the same error as indicated before.

> Also - connecting as the rtuser may be insufficient to fix
> permissions.  I suspect you actually need to run the acl fixes in RT
> as the postgres user.

  What I had to do was to request the script explicitly to run as the
  postgres user and authenticate with the postgres user password.

root at rt:~# sudo -u postgres /usr/sbin/rt-setup-database --action acl --dba postgres
In order to create or update your RT database, this script needs to connect to your  Pg instanc\
e on localhost as postgres
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Working with:
Type:   Pg
Host:   localhost
Name:   rtdb
User:   rtuser
DBA:    postgres
Now inserting database ACLs.
Done.

  A test seems to suggest that the problem is gone, but I will 
  keep a croned job to look at for a reoccurance of the problem.

  Thank you so much! If you make it to NYC and if I am in town, I'll
  buy you beer.

> Once you figure this out, I suggest considering using the
> debian-backports repo to get a version of RT from 2013 not 2012.

  Ha! I will pass this suggestion on to my superiors.

-- 

  Cheers,

  Thomas Krichel                  http://openlib.org/home/krichel
                                              skype:thomaskrichel



More information about the rt-users mailing list