[ThingWorx] Install PostgreSQL Issue

ThingWorx application need PostgreSQL, I try configurate it in macbook. The first step is install PostgreSQL. sql

Install PostgreSQL is very easy. Download it from www.postgresql.org, and install it.app

But after installing db, I need create the database and space. I got error by following command.post

postgres=# CREATE TABLESPACE thingworx
postgres-#   OWNER twadmin
postgres-#   LOCATION '/Work/ThingWorx/ThingworxPostgresqlStorage/thingworx';
ERROR:  could not set permissions on directory "/Work/ThingWorx/ThingworxPostgresqlStorage/thingworx": Operation not permitted
postgres=# 
ERROR:  could not set permissions on directory "/Work/ThingWorx/ThingworxPostgresqlStorage/thingworx": Operation not permitted

After some search in bing and baidu, I found the solution and reason.spa

The folder I was created by 'Eric' user, but PostgreSQL need set the creator as 'postgres'. Than I change the folder creator by following command.postgresql

$sudo chown postgres /Work/ThingWorx/ThingworxPostgresqlStorage/thingworx

$sudo chown postgres /Work/ThingWorx/ThingworxPostgresqlStorage/thingworxcode

After change the folder's owner, it work well.blog

 

BTW, If you create table or space repear the permission issue, please check the PostgreSQL's service account have full permission for the folder.macbook

相關文章
相關標籤/搜索