Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1poJLV-0003C2-8b for pgsql-novice@arkaria.postgresql.org; Mon, 17 Apr 2023 07:32:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1poJLT-0002mn-IX for pgsql-novice@arkaria.postgresql.org; Mon, 17 Apr 2023 07:32:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1poJLT-0002me-5V for pgsql-novice@lists.postgresql.org; Mon, 17 Apr 2023 07:32:15 +0000 Received: from mail-vs1-xe2c.google.com ([2607:f8b0:4864:20::e2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1poJLQ-000HLw-QH for pgsql-novice@lists.postgresql.org; Mon, 17 Apr 2023 07:32:13 +0000 Received: by mail-vs1-xe2c.google.com with SMTP id g8so2646209vss.1 for ; Mon, 17 Apr 2023 00:32:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681716731; x=1684308731; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=XAdSYbJKYYExOWnvf/Vbhb3hZN8HImBUSMxwjNRGEMI=; b=a5uGtXPvXI93ES5YK7niTjBOIlnSoED7gVvOtT3uAu+Vmot80k7Zf1Ctf3W9QoDzN1 qGX6akb4OyUy+TJmvKFAr/Ju1zfkMxwy4YXr40Pk1h4LP5soz5bD95TzZde4L2IRgfmF mJNiTV8YdbeNQparwb4T+WrP2HJbEd21yx+bMlLCOXE7lVAmKygGHnX6IfnCrnqzpMFG hKuDhnKcufPUDVz6o1RQMiEXBifP0IggWd9oQ0sL2lyfptEQvRw4MyN1KjDVz6BwDbAZ CbvUbl8O2aDbaEQn3Ym9JK3/RXK9bLOHIQicr6Dmo8d6EK8DD4iXxj9mf124v8vUKko4 qDLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681716731; x=1684308731; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=XAdSYbJKYYExOWnvf/Vbhb3hZN8HImBUSMxwjNRGEMI=; b=kmq6mA7UTwZe+Oalv/tYvRUoTc1AvYAFTaghyyCnhkb0/XgGgTRIG1Wps29SY6lxWC OrfEZrYiQH9aF8A40T8yld9/yNWSqLF2+/GacMfuFh9gQdv1PcUg+jWU4WMieatXdcLB PwNaFMdX1RKouhgfDZkAHnewSyCiarx29RfMYQShtcKjZoUtyVU9+Rk7bxYFiXmvOXeZ U4wv0ad1Azomy97k1hBgHMujYtSc01Doa6RONmytWL2Mo99YnLMEcv05EuZjw21egXaV gU8DNV8u/zrXpkAAwHYtWZw5jpNyyNgQPjhUTFzNDKdnt8tsw86IEvaoJSarCIcztfRS u6HA== X-Gm-Message-State: AAQBX9cPVCIG5VwkmwG5cxNRxlnAN50WwW5DFuEZSQbLerXLmNZY8vAP FRXFOxixO6o65J8gGac9noJtqDeLMGwy6lbI4vRAi9PZ1M0= X-Google-Smtp-Source: AKy350Z1kyOKEzHbmlL8jnfaO7+lS8CnNI77MWV4sDQnyp/dsQ+Oo1ww4VmIZXM3Dx5y4UjvaMxy89HPtnDH7W1RjMs= X-Received: by 2002:a67:c196:0:b0:42e:2dea:3259 with SMTP id h22-20020a67c196000000b0042e2dea3259mr7196570vsj.3.1681716731013; Mon, 17 Apr 2023 00:32:11 -0700 (PDT) MIME-Version: 1.0 From: Johan Antonissen Date: Mon, 17 Apr 2023 09:31:59 +0200 Message-ID: Subject: To: pgsql-novice@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000005d8be205f983309a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005d8be205f983309a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable hello! I=E2=80=99m trying to learn django using this 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 DATABASEG= RANT The error arises on the part after | I=E2=80=99ve found out. My error is th= erefore a postgres permission error rather than a django error I think. I=E2=80=99ve found numerous people that are also facing permission errors w= hen using postgres but these solutions have however not helped me understand and fix the error. I=E2=80=99m running Fedora and systemctl and pg_isready shows everything sh= ould 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 --0000000000005d8be205f983309a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

hello!

I=E2= =80=99m trying to learn django using=C2=A0this=C2=A0book.

=
It gives a great low-level tutorial for deploying djang on using cookie= cutter.


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

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

results to:

Could not change direct= ory ... permission denied CREATE= ROLE CREATE= DATABASE GRANT

The error arises on the part after | I=E2=80=99ve found out= . My error is therefore a postgres permission error rather than a django er= ror I think.

I=E2=80=99ve 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=E2=80=99m running Fedora an= d systemctl and pg_isready shows everything should be working correctly.

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

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

Thank= you in advance!

Johan

<= /div>
--0000000000005d8be205f983309a--