hi all,
I am using Linux Mint 17.1 and have installed PostgreSQL 9.3 using:
sudo apt-get install postgresql postgresql-contrib
I have a separate hardrive mounted at /media/myusername/Storage
In the storage folder I have created a folder called postgres_data and have changed the ownership of the folder to postgres using:
sudo chown postgres:postgres /media/myusername/Storage/postgres_data
I am trying to set it up such that postgres will use this folder for the databases but am not having much luck. I have logged in as postgres and tried to run initdb but I get the following error:
su postgres
/usr/lib/postgresql/9.3/bin/initdb -D /media/myusername/Storage/postgres_data/
Quote:
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_ZA.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
initdb: could not access directory "/media/myusername/Storage/postgres_data": Permission denied
|
Im not sure what to do because postgres is the owner of the folder and has full rights to it. Please could someone assist.