Обсуждение: [ADMIN] pg_basebackup permission denied error

Поиск
Список
Период
Сортировка

[ADMIN] pg_basebackup permission denied error

От
Günce Kaya
Дата:
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

Re: [ADMIN] pg_basebackup permission denied error

От
Shreeyansh Dba
Дата:


On Thu, Nov 9, 2017 at 6:16 AM, Günce Kaya <guncekaya14@gmail.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


Hi Gunce Kaya,


/data -- directory requires postgres user permission.


--

Re: [ADMIN] pg_basebackup permission denied error

От
Günce Kaya
Дата:
Hi,

/data directory's owner is Postgres and I also changed permission as chmod 700 data. Still doesn't work now. 

Regards,
Gunce


On Thu, Nov 9, 2017 at 8:27 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


On Thu, Nov 9, 2017 at 6:16 AM, Günce Kaya <guncekaya14@gmail.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


Hi Gunce Kaya,


/data -- directory requires postgres user permission.


--




--
Gunce Kaya

Re: [ADMIN] pg_basebackup permission denied error

От
Shreeyansh Dba
Дата:


On Thu, Nov 9, 2017 at 6:27 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


On Thu, Nov 9, 2017 at 6:16 AM, Günce Kaya <guncekaya14@gmail.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


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.

Re: [ADMIN] pg_basebackup permission denied error

От
Günce Kaya
Дата:
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?

Regards,
Gunce

On Thu, Nov 9, 2017 at 8:49 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


On Thu, Nov 9, 2017 at 6:27 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


On Thu, Nov 9, 2017 at 6:16 AM, Günce Kaya <guncekaya14@gmail.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


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.




--
Gunce Kaya

Re: [ADMIN] pg_basebackup permission denied error

От
Gokhan Demir
Дата:
Hi Günce,

There must be no "data" directory on the target server, which the pg_basebackup command is run on, (this is a precaution set by postgreSQL to force admins to make sure no data will be overwritten) and the owner of parent directory of this "data" director must also be postgres user and postgres user must have necessary permissions on the parent directory. So, I wouldn't suggest using "/data" if it is right below the "/" (root) directory if I understand correctly.

Issue might be caused because of the above situation. Just my two cents..

Gokhan.

On Thu, Nov 9, 2017 at 11:07 AM, Günce Kaya <guncekaya14@gmail.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?

Regards,
Gunce

On Thu, Nov 9, 2017 at 8:49 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


On Thu, Nov 9, 2017 at 6:27 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


On Thu, Nov 9, 2017 at 6:16 AM, Günce Kaya <guncekaya14@gmail.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


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.




--
Gunce Kaya


Re: [ADMIN] pg_basebackup permission denied error

От
Shreeyansh Dba
Дата:


On Thu, Nov 9, 2017 at 8:07 AM, Günce Kaya <guncekaya14@gmail.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.
 

Regards,
Gunce

On Thu, Nov 9, 2017 at 8:49 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


On Thu, Nov 9, 2017 at 6:27 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


On Thu, Nov 9, 2017 at 6:16 AM, Günce Kaya <guncekaya14@gmail.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


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.

http://www.shreeyansh.com

--
Gunce Kaya


--

http://www.shreeyansh.com

Re: [ADMIN] pg_basebackup permission denied error

От
Günce Kaya
Дата:
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@gmail.com> wrote:


On Thu, Nov 9, 2017 at 8:07 AM, Günce Kaya <guncekaya14@gmail.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.
 

Regards,
Gunce

On Thu, Nov 9, 2017 at 8:49 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


On Thu, Nov 9, 2017 at 6:27 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


On Thu, Nov 9, 2017 at 6:16 AM, Günce Kaya <guncekaya14@gmail.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


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.

http://www.shreeyansh.com

--
Gunce Kaya


--

http://www.shreeyansh.com



--
Gunce Kaya