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 1vDpXT-00HBDe-Sf for pgsql-sql@arkaria.postgresql.org; Tue, 28 Oct 2025 19:39:27 +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 1vDpXS-00Eoby-Pv for pgsql-sql@arkaria.postgresql.org; Tue, 28 Oct 2025 19:39:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDpXS-00EobM-GU for pgsql-sql@lists.postgresql.org; Tue, 28 Oct 2025 19:39:25 +0000 Received: from deimos.limes.com.pl ([193.110.228.48]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vDpXO-004Fz2-0u for pgsql-sql@lists.postgresql.org; Tue, 28 Oct 2025 19:39:24 +0000 Received: from localhost (localhost [127.0.0.1]) by deimos.limes.com.pl (Postfix) with ESMTP id 98E372512080 for ; Tue, 28 Oct 2025 20:39:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at deimos.limes.com.pl X-Spam-Flag: NO X-Spam-Score: -3.025 X-Spam-Level: X-Spam-Status: No, score=-3.025 tagged_above=-9999 required=6.11 tests=[ALL_TRUSTED=-1, AWL=-0.116, BAYES_00=-1.9, HTML_MESSAGE=0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no Received: from deimos.limes.com.pl ([127.0.0.1]) by localhost (deimos.limes.com.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2FXhKh5mwUKe for ; Tue, 28 Oct 2025 20:39:17 +0100 (CET) Received: from [192.168.51.220] (host141-89-206-34.limes.com.pl [89.206.34.141]) by deimos.limes.com.pl (Postfix) with ESMTPA id 95C152512048 for ; Tue, 28 Oct 2025 20:39:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=limes.com.pl; s=mail; t=1761680357; bh=3khemwkt/pL6mNdoMxkfs0niX/s1V/u27tV2xEd5IbQ=; h=Date:To:From:Subject; b=NloMrhOLtqhV/4x296FbZ6o+nXbMuCyd2jxlQeuBCdwnCZWl0G7FUzYSSx2d3ROXu 7+DvDQOJvjckS1+NUK7g7+6NKrXMGU5ZgKYqHfAqBy7RjV2U+i6NFifNPQtk5mNvdJ wHImxcoxNXc8NO+uFimwmxO7EOQ3mZl3/6cggBxLmYnRVpw65z3uw1/FRdTuCx0ZMp X3x038fbecpKdT3ISJ/lpP9q/JfeuEPfxR5qmHMtsmRungMcbjcckUjciI5faERN6/ kBC8cpM+1urNrBwHRD+dqYhb5LRt+TDt6wkoboS1suFdvDj+zYdXXTTUzedotIwTvj +9F8KNBjyUOTA== Content-Type: multipart/alternative; boundary="------------hF2FG8V3WKa9O1rsyCwvYU0q" Message-ID: Date: Tue, 28 Oct 2025 20:39:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: pgsql-sql@lists.postgresql.org From: Krzysztof Subject: Linux file permission for COPY TO SQL command List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------hF2FG8V3WKa9O1rsyCwvYU0q Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable I try to use COPY TO command to copy results of a SELECT but I get this=20 message: ERROR: =C2=A0could not open file "a file" for writing: Permission denied User, group and other are granted full permission to this file. What=20 should I do more to get this working? --=20 Pozdrawiam Krzysztof Jasie=C5=84ski --------------hF2FG8V3WKa9O1rsyCwvYU0q Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I try to use COPY TO command to copy results of a SELECT but I get this message:

ERROR: =C2=A0= could not open file "a file" for writing: Permission denied User, group and other are granted full permission to this file. What should I do more to get this working?

--=20
Pozdrawiam
Krzysztof Jasie=C5=84ski
--------------hF2FG8V3WKa9O1rsyCwvYU0q--