I have all the permissions but it still shows permission denied - Linux Terminal

182 Views Asked by At

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.

0

There are 0 best solutions below