Re: [BUGS] BUG #2934: INSTALL FAILURE - failed to set permissions

2007-01-27 Thread Magnus Hagander
inifinity wrote:
> The following bug has been logged online:
> 
> Bug reference:  2934
> Logged by:  inifinity
> Email address:  [EMAIL PROTECTED]
> PostgreSQL version: 8.2
> Operating system:   Windows XP
> Description:INSTALL FAILURE - failed to set permissions on the
> installed files
> Details: 
> 
> I've been trying to install this from past two days and all I can see is a
> an error message towards the end of installation and a log file which I
> cannot acccess in my default C:\program files\postrgresql\8.2
> 
> the error says to check a log file perm.log but I cannot browse or delete
> the *\8.2 folder. says access denied. 
> 
> I have a admin user account and Im 100% sure I have given the right
> username/pwd in the first page of the installation with 'postgresql' as a
> superuser (and a diff pwd). 
> 
> Tried searching all forums but no result.
> 
> I just hope someone sees this message and comes up with a solution rather
> than ask my cryptic questions in return

What are the permissions on the directory c:\program files, and what are
the permissions on the postgresql directory that you cannot browse?

//Magnus


---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [BUGS] BUG #2931: Can't capture pg_dump Password prompt

2007-01-27 Thread Magnus Hagander
Michael Schmidt wrote:
> The following bug has been logged online:
> 
> Bug reference:  2931
> Logged by:  Michael Schmidt
> Email address:  [EMAIL PROTECTED]
> PostgreSQL version: 8.2
> Operating system:   Windows XP Pro
> Description:Can't capture pg_dump Password prompt
> Details: 
> 
> I have a Java user app that allows database backup and restore by accessing
> pg_dump and pg_restore.  With PostgreSQL version 8.1, I was able to capture
> the Password: prompt on stderr, which allowed me to send to password at the
> proper time.  This no longer works with PostgreSQL 8.2.  I've worked on this
> for three days and even wrote a separate Java app to test various PostgreSQL
> utilities, posting results on the General list (got no help there).  I
> further confirmed the behavior by redirecting stderr from Windows cmd.exe. 
> Although the password prompt appears on the screen, it does not appear to be
> in either stdout or stderr.  For Windows command prompt, the following was
> used:
> pg_dump.exe -Upostgres --host=localhost --port=5432 -W -v
> --file=E:\Backup\test.bak npbase 2>>log.txt
> 
> As expected from using -v, a nice log of output was present in log.txt but
> not the "Password: " prompt.  I will supply the Java test app if you like. 
> 
> 
> If the prompt is, in fact, being output on stderr, it cannot be accessed
> from either cmd.exe or Java.  If it has been changed, documentation on how
> to access it would be useful for app developers.  

This is not a bug, it's a feature ;-) It's written to the console, not
to the standard stream. If you launch the tools externally and want to
pass the password, you should either use the pgpass.conf file, or set
the PGPASSWORD (this is safe on Win32).

//Magnus

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [BUGS] BUG #2934: INSTALL FAILURE - failed to set permissions

2007-01-27 Thread Magnus Hagander
Priyatam wrote:
> I solved it by creating a new user 'postgresql' with admin privileges
> before the setup began and it works fine. However Im disp to see that
> this doesnt work for an existing windows user with admin privileges.

It does for me. I do that all the time, and I've never had the problem.


> Your questions are invalid as in windows a user with admin privileges
> will have access to all folders.

That is simply false. There are several ways for a user with admin
privileges not to have access to a local folder on Windows. Read up on
NTFS ACLs and you'll find it.
There are also several cases where Windows will report access denied for
errors that *are not related to permissions*.


> You guys should do a better job of creating a user friendly installation
> package


We're trying. That's why I asked you those questions. Without feedback,
we can't make it better, because it works fine in all "normal"
situations for thousands of other people. We want to know *why* it
didn't work in your case, so we can fix it or at least document it.


//Magnus

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [BUGS] BUG #2931: Can't capture pg_dump Password prompt

2007-01-27 Thread Magnus Hagander
(please keep responses on the list)

Michael Schmidt wrote:
> Mr. Hagander,
> Thanks for taking the time to look at this.  Unfortunately, the 8.2
> documentation and information obtained from 'pg_dump --help' indicate
> PGPASSWORD is no longer available.  Using pgpass.conf creates
> cross-platform issues, as it is stored in different places on different
> systems. 

It's definitly still available, see
http://www.postgresql.org/docs/8.2/static/libpq-envars.html.

It may not always be clear, but all the "libpq environment varilables"
apply to all the utilities that are based on libpq, which is pretty much
all of them.

I can see how using pgpass can be a cross platform problem. If you're
doing cross platform, you may have a security problem from PGPASSWORD
though - I don't know the detauls.


> While I understand that sending the Password: prompt to the console is a
> new "feature", the rationale in changing it from stderr is unclear. 
> When it is on a *standard* stream it is - well - standard!  This good
> behavior is appreciated by at least one developer (me)! 

It was changed to be consistent with Unix, IIRC.


> Given the issues with PGPASSWORD and password.conf, would you folks
> consider putting the Password: prompt back the way it was?

I doubt it. I don't hold a strong opinion myself, but I think it has
been proposed and rejected before.

//Magnus


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly