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 1qSzAV-0080gf-3l for pgsql-general@arkaria.postgresql.org; Mon, 07 Aug 2023 12:17:03 +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 1qSzAT-009Ipx-LQ for pgsql-general@arkaria.postgresql.org; Mon, 07 Aug 2023 12:17:02 +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 1qSzAT-009Ipd-78 for pgsql-general@lists.postgresql.org; Mon, 07 Aug 2023 12:17:01 +0000 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qSzAQ-0011IR-HJ for pgsql-general@lists.postgresql.org; Mon, 07 Aug 2023 12:17:00 +0000 Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-4055bc3cdd8so34873021cf.1 for ; Mon, 07 Aug 2023 05:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691410617; x=1692015417; h=in-reply-to:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=jyeVSRzQrS4ru9bCCjfU16k3CuGBm5O635hEpdepI9k=; b=pPZa44w9HvF/FQTUfmq5E5wwLuBaxcAt17eDbbhTl1FpU7KequdedUvXR5l0xvIQDk bnHv4Sjqf8l+dODNL9kXRJeTeZINiEfljQ9r15l+CpVnQjZ5tmCvgnN1XmG7tKitoxZa IwKx7hH0+olGmwdTXA2EGnfygRRuPK5kUCfoaichWMR4E1Fw56dRDWXZX5hqtn3TTrw7 FyJXiobzgX3LaDcyjnbTNbS1sAkYYTFH3bYKN5u4EHnLdOe5C7mJ/2SxT43Ynz2PiW5r fsoxvmNVovA6HX6ni04AWFmVmOi13327wfpjij7m8lc5o47REU6O2/UYjT/+no66LCjO xdGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691410617; x=1692015417; h=in-reply-to:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jyeVSRzQrS4ru9bCCjfU16k3CuGBm5O635hEpdepI9k=; b=g9lbVa8wq3W9bpvqMYwWwjsEzg3mTgpzgpXBubY03apJFmQj0RejIJ7HfFgDYNsXry Ul0qcNp7apGvBX8AGbbTXvk3Lbj3lIJtjZA6rspcrEs/v0IPl88unjckRlcDSVOt/hjW Icghr6hUccR2qY4fochkiHWCmtPlmYcp+Kkm9b0cVLvZyGH54KRxA8UNy/NU5wtOmpBL 3ykbdujmy+MEF7ejN5MIVmAOs+qQMFyV4rXHaglnzPZUYPGYIEEH/h7sDkYLHA8UMU/S EEELxn6wT7vlI3BDs7xL05Te23oAdstCS/F80NA7O2bay9YxAMlSRv4tk0wfs55B3WUG Tf2A== X-Gm-Message-State: AOJu0YzM70dbSoxRYs8FaZVfhxCoiocNEMgGI8Yc7gqlFA1TMMRB1+9n J/IjUcb6ZndO2fLhsyCBC0nAFx4twHOBjg== X-Google-Smtp-Source: AGHT+IHYZxJK/nclkqNm2gl+C0jlPqi+ujs5ym+mnJEhug3390XdMRRIpOCnLDewRNvRalnvuYeyPQ== X-Received: by 2002:a05:622a:1746:b0:403:e84a:6ef5 with SMTP id l6-20020a05622a174600b00403e84a6ef5mr12503492qtk.12.1691410617249; Mon, 07 Aug 2023 05:16:57 -0700 (PDT) Received: from [192.168.2.170] ([67.70.150.114]) by smtp.gmail.com with ESMTPSA id x25-20020ac84a19000000b0040ff234b9c4sm2587394qtq.25.2023.08.07.05.16.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Aug 2023 05:16:56 -0700 (PDT) From: Amn Ojee Uw X-Google-Original-From: Amn Ojee Uw Content-Type: multipart/alternative; boundary="------------0wTbYYumIcmqtQP11yvU51w1" Message-ID: Date: Mon, 7 Aug 2023 08:16:47 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 Subject: Re: My 1st TABLESPACE To: pgsql-general@lists.postgresql.org References: <52ffd5a0-89b2-931d-f135-cbd65027eb28@negora.com> Content-Language: en-US In-Reply-To: <52ffd5a0-89b2-931d-f135-cbd65027eb28@negora.com> 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. --------------0wTbYYumIcmqtQP11yvU51w1 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Thanks Negora. Makes sense, I will check it out. On 8/7/23 1:48 a.m., negora wrote: > > Hi: > > Although the "postgres" user owns the "data" directory, Has he access > to the whole branch of directories? Maybe the problem is that he can't > reach the "data" directory. > > Regards. > > > On 07/08/2023 07:43, Amn Ojee Uw wrote: >> >> I'd like to create a TABLESPACE, so, following this web page >> ,  >> I have done the following : >> >> *mkdir >> /home/my_debian_account/Documents/NetbeansWorkSpace/JavaSE/Jme/database/postgresql/data* >> >> *sudo chown postgres:postgres >> /home/my_debian_account/Documents/NetbeansWorkSpace/JavaSE/Jme/database/postgresql/data* >> >> *sudo -u postgres psql* >> >> *\du** >> ** arbolone    | Cannot login                                      | {}** >> ** chispa | | {prosafe}** >> ** workerbee | Superuser, Create DB                        | {arbolone}** >> ** jme | | {arbolone}** >> ** postgres    | Superuser, Create role, Create DB, Replication, >> Bypass RLS | {}** >> ** prosafe      | Cannot login                                      | >> {}** >> **** >> **CREATE TABLESPACE jmetablespace OWNER jme LOCATION >> '/home/my_debian_account/Documents/NetbeansWorkSpace/JavaSE/Jme/database/postgresql/data';* >> >> The *CREATE **TABLESPACE* schema throws this error message : >> >> /*ERROR:  could not set permissions on directory >> "/home/my_debian_account/Documents/NetbeansWorkSpace/JavaSE/Jme/database/postgresql/data": >> Permission denied*/ >> >> I have followed the web page to the best of my abilities, and AFAIK, >> the postgres user owns the folder '*data*'. >> >> I know that something is missing, where did I go wrong and how can I >> resolve this issue? >> >> >> Thanks in advance. >> >> --------------0wTbYYumIcmqtQP11yvU51w1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Thanks Negora.

Makes sense, I will check it out.

On 8/7/23 1:48 a.m., negora wrote:

Hi:

Although the "postgres" user owns the "data" directory, Has he access to the whole branch of directories? Maybe the problem is that he can't reach the "data" directory.

Regards.


On 07/08/2023 07:43, Amn Ojee Uw wrote:

I'd like to create a TABLESPACE, so, following this web page,  I have done the following :

mkdir /home/my_debian_account/Documents/NetbeansWorkSpace/JavaSE/Jme/database/postgresql/data

sudo chown postgres:postgres /home/my_debian_account/Documents/NetbeansWorkSpace/JavaSE/Jme/database/postgresql/data

sudo -u postgres psql

\du
 arbolone    | Cannot login                                      | {}
 chispa        |                                                            | {prosafe}
 workerbee | Superuser, Create DB                        | {arbolone}
 jme            |                                                            | {arbolone}
 postgres    | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
 prosafe      | Cannot login                                      | {}
 
CREATE TABLESPACE jmetablespace OWNER jme LOCATION '/home/my_debian_account/Documents/NetbeansWorkSpace/JavaSE/Jme/database/postgresql/data';

The CREATE TABLESPACE schema throws this error message :

ERROR:  could not set permissions on directory "/home/my_debian_account/Documents/NetbeansWorkSpace/JavaSE/Jme/database/postgresql/data": Permission denied

I have followed the web page to the best of my abilities, and AFAIK, the postgres user owns the folder 'data'.

I know that something is missing, where did I go wrong and how can I resolve this issue?


Thanks in advance.


--------------0wTbYYumIcmqtQP11yvU51w1--