Re: pg_basebackup permission denied error

From: Günce Kaya <guncekaya14(at)gmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_basebackup permission denied error
Date: 2017-11-09 11:59:00
Message-ID: CAAV2-mUUhF2v=8fiY-WNoN=_X=6Zg+Xkjk7J41_kS+mDZnqPOg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi all,

Problem was resolved. I'm sending this mail for recording.

I added /data folder under / directory as root user and changed permission
to 700, changed owner as Postgres. After that I run pg_basebackup command.
So, it works now.

Best regards,
Günce

On Thu, Nov 9, 2017 at 11:04 AM, Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
wrote:

>
>
> On Thu, Nov 9, 2017 at 8:07 AM, Günce Kaya <guncekaya14(at)gmail(dot)com> wrote:
>
>> Hi again,
>>
>> I have created rep user like;
>>
>> CREATE USER rep REPLICATION LOGIN ENCRYPTED PASSWORD 'xxxx';
>>
>> So, user having replication permission. Maybe I miss something about this
>> situation. Is there anything additional for that?
>>
>
> For more details please go through the below link provided.
> https://www.postgresql.org/docs/current/static/app-pgbasebackup.html
>
>
>>
>> Regards,
>> Gunce
>>
>> On Thu, Nov 9, 2017 at 8:49 AM, Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
>> wrote:
>>
>>>
>>>
>>> On Thu, Nov 9, 2017 at 6:27 AM, Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com
>>> > wrote:
>>>
>>>>
>>>>
>>>> On Thu, Nov 9, 2017 at 6:16 AM, Günce Kaya <guncekaya14(at)gmail(dot)com>
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I'm getting error when using pg_basebackup as bellow;
>>>>>
>>>>> pg_basebackup: could not create directory "/data": Permission denied
>>>>>
>>>>> I couldn't overcome with that problem. Any suggestion would be
>>>>> appreciated.
>>>>>
>>>>> Regards,
>>>>> Gunce Kaya
>>>>>
>>>>> Linkedin <https://tr.linkedin.com/in/guncekaya> - Twitter
>>>>> <https://twitter.com/gguncesi> - Blog
>>>>> <http://www.guncekaya.blogspot.com.tr/>
>>>>>
>>>>
>>>> Hi Gunce Kaya,
>>>>
>>>> /data -- directory requires postgres user permission.
>>>>
>>>> In addition to this, the user might not be a valid DB user having
>>> enough privileges in order to perform backup having entry in pg_hba file.
>>>
>>> [image: http://www.shreeyansh.com] <http://www.shreeyansh.com>
>>>
>>
>> --
>> Gunce Kaya
>>
>> Linkedin <https://tr.linkedin.com/in/guncekaya> - Twitter
>> <https://twitter.com/gguncesi> - Blog
>> <http://www.guncekaya.blogspot.com.tr/>
>>
>
> --
>
> [image: http://www.shreeyansh.com] <http://www.shreeyansh.com>
>

--
Gunce Kaya

Linkedin <https://tr.linkedin.com/in/guncekaya> - Twitter
<https://twitter.com/gguncesi> - Blog
<http://www.guncekaya.blogspot.com.tr/>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Marcelo Kruger 2017-11-09 12:06:30 Re: High replication lag - Stream Replication
Previous Message Shreeyansh Dba 2017-11-09 09:04:27 Re: pg_basebackup permission denied error