You are not logged in.
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
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
Thanks, your answer worked fine.
Offline
Please remember to mark your thread as solved by editing the first post and amending your topic title.
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