Re: PGS Tuning Wizard destroys my login - Mailing list pgsql-general

From John R Pierce
Subject Re: PGS Tuning Wizard destroys my login
Date
Msg-id 49DCC60D.6030808@hogranch.com
Whole thread Raw
In response to Re: PGS Tuning Wizard destroys my login  (Jennifer Trey <jennifer.trey@gmail.com>)
Responses Re: PGS Tuning Wizard destroys my login
List 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.





pgsql-general by date:

Previous
From: Ian Mayo
Date:
Subject: Are there performance advantages in storing bulky field in separate table?
Next
From: Tom Lane
Date:
Subject: Re: Are there performance advantages in storing bulky field in separate table?