3

I try to run this simple command:

CREATE TABLESPACE tb_rec
 OWNER postgres
 LOCATION 'd:/tablespaces';

However, the tablespace is not created and I got this message:

ERREUR: n'a pas pu configurer les droits du répertoire « d:/tablespaces » : Permission denied

For non french speakers:

ERROR: was not able to configure the directory rights « d:/tablespaces » : Permission denied

I didn't find any postgres user (net user) and I'm stuck on this...

How to give access to the directory to postgres?

Windows 7
Postgres 9.2

asked Nov 19, 2014 at 10:43

1 Answer 1

8

For PostgreSQL 9.2 and above there is no postgres system user (by default). It runs as NETWORK SERVICE.

Create d:\tablespaces and give the NETWORK SERVICE (SERVICE RÉSEAU in french) "Full control" over it. That should do the trick.

Stephan
1,5134 gold badges18 silver badges27 bronze badges
answered Nov 19, 2014 at 11:37
3
  • Do you have any pointer to give "Full control"? Commented Nov 19, 2014 at 15:14
  • @Stephan Security tab of properties Commented Nov 19, 2014 at 15:36
  • It worked for me on Windows 10. Thank you for the french translation ^^ Commented Nov 12, 2024 at 7:24

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.