postgresql - Django loaddata returns a permission denied for relation -
i trying load data json file generated dumpdata on django project new 1 new database using loaddata. connection db seems work right away receive permission denied relation django_content_type. don't permission talking about. db postgres on separate server , connect through vagrant virtual machine on laptop has virtual environment , settings.py has settings connect db. here traceback:
problem installing fixture 'djgprd1_dumpdata.json': traceback (most recent call last): file "/home/vagrant/devenv/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 196, in handle obj.save(using=using) file "/home/vagrant/devenv/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 165, in save models.model.save_base(self.object, using=using, raw=true) file "/home/vagrant/devenv/local/lib/python2.7/site-packages/django/db/models/base.py", line 524, in save_base manager.using(using).filter(pk=pk_val).exists())): file "/home/vagrant/devenv/local/lib/python2.7/site-packages/django/db/models/query.py", line 565, in exists return self.query.has_results(using=self.db) file "/home/vagrant/devenv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 441, in has_results return bool(compiler.execute_sql(single)) file "/home/vagrant/devenv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 818, in execute_sql cursor.execute(sql, params) file "/home/vagrant/devenv/local/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute return self.cursor.execute(sql, params) file "/home/vagrant/devenv/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute return self.cursor.execute(query, args) databaseerror: not load contenttypes.contenttype(pk=29): permission denied relation django_content_type
what doing wrong here?
the postgres user db created automatically , did not check permissions, missing db grant privileges on database x user y;
resolved permissions problem. bad.
Comments
Post a Comment