Re: PGS Tuning Wizard destroys my login

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Jennifer Trey <jennifer(dot)trey(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PGS Tuning Wizard destroys my login
Date: 2009-04-08 15:43:09
Message-ID: 49DCC60D.6030808@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jennifer Trey wrote:
> *As far as I know, *I have one user and that is the Administrator. Not
> sure if that is the commander in chief but obviously not, because he
> is screwing with me allot.

unlike Unix derivatives, the Windows Administrator account does NOT have
file access override rights, it has to obey rights just like any other
user. The one special power Adminstrator does have is the right to
change file ownership, but they made this as obfuscated as possible.

The standard Windows PostgreSQL install creates a special unprivileged
user 'postgres' which must own the data directory and have read/write
access to all files in it, and is used to run the postgresql server
process. This postgres account needs and has no special privileges,
except the right to run as a service.

In Unix derived systems, when you update an existing file, it tends to
NOT create a new file, just replace the data in the existing file, so by
default ownership and privileges remain the same. In Windows,
instead, its more common to create a new file, then remove the old one
and rename the new one, this means when user X edits an existing file,
he tends to end up being the owner. So, if user "Administrator"
runs this tuning tool, odds are pretty good that user running the tool
will own the postgresql.conf file it creates. AFAIK, there's no
special requirement that Postgres owns this file, it just needs read
privileges, so I'd check the file access rights after running the tool.
yeah, I just checked on my XP system here, my own account 'owns' the
file, but the postgres user has modify/read/write/execute privileges on it.

C:\> cacls D:\postgres\8.3\data\postgresql.conf
D:\postgres\8.3\data\postgresql.conf BUILTIN\Administrators:F
NT AUTHORITY\SYSTEM:F
PORKER\pierce:F
BUILTIN\Users:R
PORKER\postgres:C

one method of 'fixing' this, then, would be...

C:\> cacls \path\to\data\postgresq.conf /e /g:postgres:RWC

now try starting the postgres service process...
C:\> net start pgsql-8.3
The PostgreSQL Database Server 8.3 service is starting.
The PostgreSQL Database Server 8.3 service was started successfully.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-04-08 15:47:43 Re: Are there performance advantages in storing bulky field in separate table?
Previous Message Ian Mayo 2009-04-08 15:26:09 Are there performance advantages in storing bulky field in separate table?