You are not logged in.

#1 2017-12-28 09:09:11

lithiumx
Member
Registered: 2017-12-28
Posts: 6

[SOLVED] Issue running PostgreSQL

I am trying to get Django running on my freshly installed Arch system, but I'm getting the following error when initializing the PostgreSQL's DB:

[atarak@anybus ~]$ su - postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'"
Password: 
su: warning: cannot change directory to /var/lib/postgres: Permission denied
su: failed to execute /bin/bash: Permission denied

Can anyone help me? I think it's valid to state that I've already tried the following commands:

[atarak@anybus ~]$ sudo chown postgres:postgres /var/lib/postgres/data
[atarak@anybus ~]$ sudo chmod 755 /var/lib/postgres/data

Last edited by lithiumx (2017-12-29 12:38:36)

Offline

#2 2017-12-28 09:30:20

heisenberg
Member
Registered: 2017-05-27
Posts: 87

Re: [SOLVED] Issue running PostgreSQL

I'm not an expert but I got it running in past, just following exactly what says the wiki (https://wiki.archlinux.org/index.php/Po … PostgreSQL)

I'm not sure that your command is equivalent. You should "initdb" as postgres user.

Offline

#3 2017-12-28 09:38:40

lithiumx
Member
Registered: 2017-12-28
Posts: 6

Re: [SOLVED] Issue running PostgreSQL

Thanks, your answer worked fine.

Offline

#4 2017-12-28 10:45:58

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,602
Website

Re: [SOLVED] Issue running PostgreSQL

Please remember to mark your thread as solved by editing the first post and amending your topic title.

https://wiki.archlinux.org/index.php/Co … ow_to_post


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB