public inbox for [email protected]  
help / color / mirror / Atom feed
From: Johan Antonissen <[email protected]>
To: [email protected]
Date: Mon, 17 Apr 2023 09:31:59 +0200
Message-ID: <CAEac0YaJuyWc=7Rc6kWf6hEphD-s76Ge2Q01hiAo_7rtS1YJ6w@mail.gmail.com> (raw)

hello!

I’m trying to learn django using this
<https://www.feldroy.com/books/a-wedge-of-django; book.


It gives a great low-level tutorial for deploying djang on using
cookiecutter.


However when I try to deploy django and connect to my postgres server
postgres gives me a permission error:

python manage.py sqlcreate | sudo -u postgres psql -U postgres

results to:

Could not change directory ... permission deniedCREATE ROLECREATE DATABASEGRANT

The error arises on the part after | I’ve found out. My error is therefore
a postgres permission error rather than a django error I think.

I’ve found numerous people that are also facing permission errors when
using postgres but these solutions have however not helped me understand
and fix the error.

I’m running Fedora and systemctl and pg_isready shows everything should be
working correctly.

Should I just add the user postgres to my username group to fix this error
? Or does that create a security problem ?

This should be a fairly common error, but can anyone tell me why this is
occuring ?

Thank you in advance!

Johan
<http://www.young-energy.eu/;


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: 
  In-Reply-To: <CAEac0YaJuyWc=7Rc6kWf6hEphD-s76Ge2Q01hiAo_7rtS1YJ6w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox