Re: Hint to set owner for tablespace directory

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Maksim Milyutin <milyutinma(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hint to set owner for tablespace directory
Date: 2018-08-30 16:52:01
Message-ID: 1bc2bc14-e42a-8d9c-d47c-3afac05de347@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 23/08/2018 13:24, Maksim Milyutin wrote:
> I have noticed the novice users are stuck trying to create tablespace
> over a directory whose owner is not the system postgres user. They
> observed the message "could not set permissions on directory ...:
> permission denied".
>
> I want to add patch that prints hint to set required owner for the
> tablespace directory if this is the cause of the problem (*errno ==
> EPERM* after calling *chmod*).

I think the hint is backwards. When you don't have permission to chmod
the tablespace directory, you probably want to fix the permissions on
the tablespace directory or its parent. But the hint says to run the
database server as a different user. That's a bit unusual.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2018-08-30 16:54:23 Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE
Previous Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2018-08-30 16:44:02 [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE