Search Postgresql Archives

Re: initdb problem on Windows XP Home

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



adurrant@xxxxxxxxx wrote:
Hi,

I gave restricted permissions to the postgres user on the C: drive.  After doing this, I could run initdb without issue.
 Something doesn't sit right with me with giving access to C: drive, but it works.  If anyone has any insights on what
this problem is/was and how I can get around it without granting access to C:, I would appreciate it.


With the *nix install folder permissions can stop PostgreSQL running and I will assume the same applies for windows. As you can set permissions in the properties window I assume the drive is NTFS (I don't think the security tab shows on FAT32 drives but may be why it only shows in safe mode). PostgreSQL doesn't really support FAT32 (initdb can be manually run on a FAT32 volume). The installer will fail with initdb on a FAT32 drive and may be your problem.

From the windows faq -
http://pginstaller.projects.postgresql.org/faq/FAQ_windows.html
which may have some extra info for you.

<quote>
2.5) What filesystem permissions does PostgreSQL require?

The PostgreSQL service account needs read permissions on all directories leading up to the service directory. It needs write permissions only on the data directory. Specifically, it should not be granted anything other than read permissions on the directories containing binary files. (All directories below the installation directory are set by the installer, so unless you change something, there should be no problem with this).

PostgreSQL also needs read permissions on system DLL files like kernel32.dll and user32.dll (among others), which is normally granted by default, and on the CMD.EXE binary, which may in some scenarios be locked down and need opening.

If you are running PostgreSQL on a multi-user system, you should remove the permissions from all non-administrative users from the PostgreSQL directories. No user ever needs permissions on the PostgreSQL files - all communication is done through the libpq connection. Direct access to data files can lead to information disclosure or system instability!
</quote>

I haven't used PostgreSQL on windows much but I have an XP Pro machine with it installed here and am reading the permission settings from this machine to give below.

The "read permissions on all directories up to the service directory" (which includes C:\Program Files\PostgreSQL) would normally come from all user access (Users group) settings not a specific postgres entry.

C:\Program Files\PostgreSQL\8.1\ has a postgres entry with
read & execute
List Folder Contents
Read
are ticked as allow
write is ticked as deny
all others are left blank.
Other user entries are inherited from parent.
Owner is Administrators group
Apply these settings to all child objects

C:\Program Files\PostgreSQL\8.1\data
All standard user entries have no permissions ticked (except special permissions on some)
postgres user has
modify
read & execute
list folder contents
read
write
are all ticked as allow
full control is unticked
These should be applied to all child folders of data.
The owner is the account used to run the installer.
These settings should be what is applied by the binary installer.

--

Shane Ambler
pgSQL@xxxxxxxxxxxxxxxx

Get Sheeky @ http://Sheeky.Biz


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux