Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Postgres 15.3 fails to create new tablespace (could not set permissions)

+1
−0

I am unable to create new tablespaces on a fresh Postgres 15.3 installation on Ubuntu 22.04. I tried the following so far:

  • re-install Postgres
  • fully loosen file system permission
  • disabled SELinux

But still the postgres users reports it cannot set permissions on the tablespace folder. The log is below.

$ mkdir -p /media/user/Work/Databases/geo

$ chown -R postgres:postgres /media/user/Work/Databases

$ sudo chmod -R 777 /media/user/Work/Databases

$ setenforce 0
setenforce: SELinux is disabled

$ sestatus
SELinux status:                 disabled

$ sudo su postgres
postgres@luis-workstation:/home/user$ psql
could not change directory to "/home/user": Permission denied
psql (15.3 (Ubuntu 15.3-1.pgdg22.04+1))
Type "help" for help.

postgres=# CREATE TABLESPACE geo
  OWNER postgres
  LOCATION '/media/user/Work/Databases/geo';
ERROR:  could not set permissions on directory "/media/user/Work/Databases/geo": Permission denied
History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

0 answers

Sign up to answer this question »