Re: My 1st TABLESPACE - Mailing list pgsql-general

From Amn Ojee Uw
Subject Re: My 1st TABLESPACE
Date
Msg-id f3e506f1-984a-4de1-b7f6-edf581552659@gmail.com
Whole thread Raw
In response to Re: My 1st TABLESPACE  (negora <public@negora.com>)
Responses Re: My 1st TABLESPACE  (KK CHN <kkchn.in@gmail.com>)
List pgsql-general

Thanks Negora.

Makes sense, I will check it out.

On 8/7/23 1:48 a.m., negora wrote:
#CustomCSS-add-on-marker{}.code { padding: 0.00em 0.30em 0.00em 0.30em; background-color: #ebf6e8; color: #003a0f; font-family: "DejaVu Sans Mono", monospace; font-size: 1.00em; }.code a:link { color: #003a0f; text-decoration: underline; }

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.


pgsql-general by date:

Previous
From: KK CHN
Date:
Subject: Re: Backup Copy of a Production server.
Next
From: Chris Travers
Date:
Subject: Re: Backup Copy of a Production server.