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 1poTFl-0000pY-Nh for pgsql-novice@arkaria.postgresql.org; Mon, 17 Apr 2023 18:07:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1poTFk-0005Jo-IA for pgsql-novice@arkaria.postgresql.org; Mon, 17 Apr 2023 18:07:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1poTFk-0005Jf-9K for pgsql-novice@lists.postgresql.org; Mon, 17 Apr 2023 18:07:00 +0000 Received: from mail-vs1-xe2a.google.com ([2607:f8b0:4864:20::e2a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1poTFg-003TSB-Cg for pgsql-novice@lists.postgresql.org; Mon, 17 Apr 2023 18:06:59 +0000 Received: by mail-vs1-xe2a.google.com with SMTP id e19so9200679vsa.12 for ; Mon, 17 Apr 2023 11:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681754814; x=1684346814; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pDGKd8l9wSuTmgSyO3y7qmWeuZUuFIugzyVNVc5UlUc=; b=iFuk77ZYb2nmnd4ktd6HAWyZj3s+8boTMdZVQzwTaM63r1t1ZgtUms6wYuWICYe8I1 RP0oY1wsrmcZ63dXO0zhJMEBXXN6eczjgleaCjMLCeZ4pEU7RyTGBa9w/PL5tdptYWrg 2g8l6UhLbXSwA1rm1guazziYLIipLocJZ0XprajjiH9D32jTZaBc1HMl92gkcT2W7xBP vSRKfKVC+YGVOJDu+8RvyCCqUm36ePMf0Igah/gC+bseJWRVYcqApB8dcmg1NJwvdtW9 6Z2lZ+wxLiyTisYXs0DRcpdkOIt9jmhCZw9E1Pw4kDfHQeuQ/Pw7WLIghbHCZVUnmVz8 oRXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681754814; x=1684346814; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pDGKd8l9wSuTmgSyO3y7qmWeuZUuFIugzyVNVc5UlUc=; b=FWQKDQkyB23Q0OhNCA/bVGUvNSLg1I6O/YD4GtB768Rm/vzOGbbqcosWl58lkmuVg2 FqlrTOU82f8a12w6kEoiqdTbj1vMj96ypngAweir2xOs1reHbV5QLYHW9tWUEm/NmO9j VsHVG2HXOMLE9UrTSdHc7Ke46NTJ55NtH2eowXvz+vzQZkIFPEHV8UTueTj6z8WJH145 Xh5Dy9xBRbLv/9aJuJ9cordJFsflw49UYQGsfqWq2gxJcFxZMKLAUlX6+C+mkD2jFZVP lz4yy8uyWUe2vMG79UTh6n1UK5f6Ww8G16OEf78GCRtJl5BjMvSyqIZpG9gZoXadl5cD HAVw== X-Gm-Message-State: AAQBX9f0HeGVCn1YARi7SjmlWHqF2nU+DptLeQO5FVNf/M0lW9KJ77T5 B1M1a5pZbP1Pu1HZkbrMZJ2Xs0uBW59wv118X6YeZ5ME X-Google-Smtp-Source: AKy350a6kud6n56hu3HOr0aIr8sTb8S990pwjpL/Z1Sn/LapErSfCmR/yiwDnUIjyLoUd3eZT/H3CfzBeHWjf7zWIJU= X-Received: by 2002:a67:c019:0:b0:42e:3aca:3e0c with SMTP id v25-20020a67c019000000b0042e3aca3e0cmr7323562vsi.3.1681754814139; Mon, 17 Apr 2023 11:06:54 -0700 (PDT) MIME-Version: 1.0 References: <2416657.1681739651@sss.pgh.pa.us> In-Reply-To: From: Johan Antonissen Date: Mon, 17 Apr 2023 20:06:43 +0200 Message-ID: Subject: Re: To: Josh Innis Cc: Tom Lane , pgsql-novice@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000004bd34705f98c0e39" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004bd34705f98c0e39 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello! Ok thanx for the information the clarification! I=E2=80=99m getting a ton o= f errors when I do a migration after running that line but then I guess there=E2=80= =99s a bug in the code of the book. I also see that it=E2=80=99s GitHub has not be= en updated since 2021. I=E2=80=99m just going for another book then! Thank you again for the help! On Mon, 17 Apr 2023 at 17:46, Josh Innis wrote: > +1 > > On Mon, Apr 17, 2023 at 10:54=E2=80=AFPM Tom Lane wro= te: > >> Johan Antonissen writes: >> > 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 "Could not change directory ... permission denied" part is mostly >> cosmetic. It happens when psql is invoked in a current working >> directory that the postgres user can't read. The fact that you're >> getting "CREATE ROLE", "CREATE DATABASE", etc command completion >> acknowledgements indicates that the SQL script is executing >> successfully anyway. So what you've showed us doesn't really >> indicate that anything is wrong; although you could try it from >> a publicly-readable starting directory if you want to be sure. >> >> regards, tom lane >> >> >> -- Met vriendelijke groet, Johan Antonissen --0000000000004bd34705f98c0e39 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello!

Ok thanx for the information the clarification! I=E2=80=99m getting a ton = of errors when I do a migration after running that line but then I guess th= ere=E2=80=99s a bug in the code of the book. I also see that it=E2=80=99s G= itHub has not been updated since 2021. I=E2=80=99m just going for another b= ook then!

Thank you agai= n for the help!

On Mon, 17 Apr 2023 at 17:46, Josh Innis <joshinnis@gmail.com> wrote:
+1

=
On Mon, Apr 17, 2023 at 10:54=E2=80= =AFPM Tom Lane <t= gl@sss.pgh.pa.us> wrote:
Johan Antonissen = <windhoos@gmail.= com> writes:
> However when I try to deploy django and connect to my postgres server<= br> > 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 DATA= BASEGRANT

The "Could not change directory ... permission denied" part is mo= stly
cosmetic.=C2=A0 It happens when psql is invoked in a current working
directory that the postgres user can't read.=C2=A0 The fact that you= 9;re
getting "CREATE ROLE", "CREATE DATABASE", etc command c= ompletion
acknowledgements indicates that the SQL script is executing
successfully anyway.=C2=A0 So what you've showed us doesn't really<= br> indicate that anything is wrong; although you could try it from
a publicly-readable starting directory if you want to be sure.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane


-- <= br>
Met vriendelijke groet,

Johan Ant= onissen
<= /div>
--0000000000004bd34705f98c0e39--