Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHZWC-009E28-77 for pgsql-general@arkaria.postgresql.org; Thu, 13 Jun 2024 01:44:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sHZW9-00B8aS-4E for pgsql-general@arkaria.postgresql.org; Thu, 13 Jun 2024 01:44:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHZW8-00B8aI-P4 for pgsql-general@lists.postgresql.org; Thu, 13 Jun 2024 01:44:45 +0000 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sHZW7-001OAY-6b for pgsql-general@lists.postgresql.org; Thu, 13 Jun 2024 01:44:44 +0000 Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-6f8d0a1e500so310676a34.3 for ; Wed, 12 Jun 2024 18:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718243081; x=1718847881; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pAJbX3Y43Kqswx0A3LHWjlMNTEnPq4yHJJCsRw2BeNI=; b=fis8uRTuBEeYpBD9rdfXbL/n3X0rDfrAScodmNNj2QZrZoTFFj2EOIlBygkayV1921 eCYQoRF0Q5liH8+axQA28CGC/BtRoQbn21LsAtWkuqldovph4c4qvm3VPQHM9zvE8Gle 5qav9uKmbN8owNNDC2cSqqpLOYVCS4tQHwLLnZAy66SrnO3C+PNBmEtXxEC79lu4UatM hLMCoRY74xhPpY7WBSY14Im7aLgZrUpa7b5C3zZVWwQJrB3DGtto5NGOCx+j8vUxcKik y9O50Xkyxyo5xS/Tkzb/2b0DBn3vxzEjsNlw/wNJNp9LxDalRxICP2TMsJp2yWVQLeLh xtZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718243081; x=1718847881; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pAJbX3Y43Kqswx0A3LHWjlMNTEnPq4yHJJCsRw2BeNI=; b=nhnbX6+gt+oMjvOxO11+yySUPcpo9bqUVFjc3bPwp5W2AD5sNKMhWJ3ez/jeUmWJfC Ff0lyuHuhZucUaqW+CZ0yK3+B5tkNikLtGvyZoAbA51Js/hB4rRFnu17QoN2FdUTe8B9 KASiC7BJJ01PrkFCz6RNvFckuj0ckvNNNNWR6rYr99CaqZ5fkTqDsi7BzmEBj6ZPQpbo rszBVfP9NO4Rn+ba5g1SRfRvdTmHdc8nOzj9G59EuPA5QLrJ1UikBRyaWqJSkDpTZKvo Qu77qLeLmMZwmr0tJw/s1RE/o690amv03ejKxQJKQzLVIy24UmuhPBUZJwLfqihtlWes GH0w== X-Gm-Message-State: AOJu0YwQgta7mnzKUjRHFXTkEuyiFDpcP6uqK0xCg3B8Q1lL3FzCFx/G +E7cIxJys/WxzuK3dKiMIAqhQSMsIYhoCtducSG4s5ViP85VONU37kpVDPIEjtNwL4uLFnwB2fa s3tWuMxz+Nd1IrZ5wpQP1b0ZkmpE= X-Google-Smtp-Source: AGHT+IFzbGFRJmXoKCfCv1LR4T65A+o9vbWccgb+SihJ4e0XWgJpXANivj0bjhRrkRwvhY0r96IOJL+6/RLw0NBahqw= X-Received: by 2002:a05:6870:8a0e:b0:254:a2bb:822c with SMTP id 586e51a60fabf-25514f210acmr3790549fac.43.1718243081153; Wed, 12 Jun 2024 18:44:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6802:387:b0:530:392d:d678 with HTTP; Wed, 12 Jun 2024 18:44:40 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Wed, 12 Jun 2024 18:44:40 -0700 Message-ID: Subject: Re: "permission denied to COPY to or from an external program" even with GRANT pg_execute_server_program To: Chema Cc: "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000007d7537061abba4b1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007d7537061abba4b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wednesday, June 12, 2024, Chema wrote: > > Create Role justintestin noinherit login password 'qwer'; > > > GRANT pg_execute_server_program TO justintestin; > > > Pretty sure since you choose not to allow justintestin to inherit stuff you will need to issue a =E2=80=9Cset role to pg_execute_server_program=E2=80= =9D before you attempt the copy command. David J. --0000000000007d7537061abba4b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wednesday, June 12, 2024, Chema <chema@interneta.org> wrote:

Create Role justintestin noinherit login= password 'qwer';


GRANT pg_execute_server_program TO justintestin;



Pretty = sure since you choose not to allow justintestin to inherit stuff you will n= eed to issue a =E2=80=9Cset role to pg_execute_server_program=E2=80=9D befo= re you attempt the copy command.

David J.
=C2=A0 --0000000000007d7537061abba4b1--