I am logged in as postgres user at location /home/postgres, I created a file assignment it has all the necessary permissions for postgres user
the file permissions looks like -
for /home/postgres
drwxr-xr-x 2 postgres postgres 4096 Jun 2 13:13 assignment
for /home
drwxr-xr-x 3 postgres postgres 4096 Jun 2 13:18 postgres
Then I start the psql shell using command psql as postgres, I try to create new TABLESPACE
postgres=# CREATE TABLESPACE assignment
postgres-# OWNER postgres
postgres-# LOCATION '/home/postgres/assignment/';
But it gives permission denied error -
ERROR: could not set permissions on directory "/home/postgres/assignment": Permission denied
I don't get it, please help I have an assignment to complete, Thanks.