August 2nd, 2012, 12:53 AM
Postgres Permission denied
We have set the permissions at the drive level and then installing postgres, however am getting the error Windows 2008 R2 machine.
Error: creating directory C:/PROGRA~2/HEWLET~1/EVAPA/DataBase/Postgres/data ...
initdb: could not create
directory "C:/PROGRA~2/HEWLET~1/EVAPA/DataBase/Postgres/data": Permission denied
August 7th, 2012, 03:26 AM
generally, in post XP era Windows does not allow unrestricted access to "C:\Program Files" directory. Each process that wants to write there must obtain UAC permission (this is done by starting application as an administrator (right-click / Run as administrator ))
Instead applications should save data to "C:\Users\userid\AppData\Roaming" directory.
Or you can do what I do and greatly simplify your life by ignoring chaotic Windows directory structure. Create your own "C:\1" directory and put ALL your data in it. In this way you control the layout and greatly simplify backup procedure.
So, try to put database into "c:\1\postgres\data" and it should just work. Otherwise you can disable UAC, or elevate process to admin access level.