#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    2
    Rep Power
    0

    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
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    3
    Rep Power
    0
    Hi,

    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.

    BR
    Loreia

IMN logo majestic logo threadwatch logo seochat tools logo