Access to a Directory Denied

When running PostgreSQL® on Windows Server and executing the create_database_windows.bat, a "Permission Denied" error may be shown when PostgreSQL® tries to access directories.

You can solve this problem as follows:

  1. Open the services-program > Navigate to postgresql-x64… (the service name) > Then right-click and select properties/"Log On". > Select the "Local System account" and tick the check box "Allow service to interact with desktop"
  2. Otherwise the script would run under the account "Network Services", which does not have any rights on a Windows server to interact with such directories.