Re: UDD broken for dde.debian.net
On 29/03/12 at 10:10 +0200, Andreas Tille wrote:
> Hi Lucas,
>
> On Thu, Mar 29, 2012 at 09:50:45AM +0200, Lucas Nussbaum wrote:
> > On 28/03/12 at 15:52 +0200, Andreas Tille wrote:
> > > Hi,
> > >
> > > On Wed, Mar 28, 2012 at 02:52:21PM +0200, Enrico Zini wrote:
> > > > Hello,
> > > >
> > > > enrico@paganini:~$ psql -h localhost -U guest -p 5441 udd
> > > > udd=> select description from all_packages limit 10;
> > > > ERROR: permission denied for relation all_packages
> > >
> > > I just did:
> > >
> > > GRANT SELECT ON all_packages TO PUBLIC;
> > >
> > > and commited the change to SVN.
> >
> > What I don't understand is that that GRANT is in sql/setup.sql. How did
> > it disappear ?
>
> I did not touched sql/setup.sql but rather added
>
> -- 2012-03-28
> -- need to set permission after recreating the view
> GRANT SELECT ON all_packages TO PUBLIC;
>
> to sql/upgrade.sql[1] which vanished again now. I have no good
> explanation why the permissions went away (I can confirm that this line
> is at the positions in setup.sql and upgrade.sql where I would expect
> them to be to become effective). So for whatever reason the granting of
> permissions needed to be done again and so I did manually and dropped
> the obviosely harmless line into upgrade.sql just for the sake of
> documentation that it was done.
>
> > Did you drop/recreate other table/views without making the required GRANTs ?
>
> No. Not that I would know of. I did the updates by
>
> psql udd < sql/upgrade.sql
Arg, sql/upgrade.sql is a way to document the changes that should be
done to another instance, and should not be used that way, since it
recreates the whole DB.
I hope that other changes were not undone....
Lucas
Reply to: