Home » Ubuntu » Insecure directory in $ENV{PATH} while running with -T switch at /usr/bin/pg_ctlcluster

4th
Sep 10
Sep 10
Insecure directory in $ENV{PATH} while running with -T switch at /usr/bin/pg_ctlcluster
Posted Saturday 4th September 2010
I received this error with PostgreSQL when using APT on Ubuntu Server 10.04. I still don’t know what triggered it (most likely permission related) but here’s an a quick cleanup.
Exact error output:
Preparing to replace postgresql-8.4 8.4.3-1 (using .../postgresql-8.4_8.4.3-1_amd64.deb) ... * Stopping PostgreSQL 8.4 database server * Insecure directory in $ENV{PATH} while running with -T switch at /usr/bin/pg_ctlcluster line 63. [fail] invoke-rc.d: initscript postgresql-8.4, action "stop" failed. dpkg: warning: old pre-removal script returned error exit status 9 dpkg - trying script from the new package instead ... * Stopping PostgreSQL 8.4 database server * Insecure directory in $ENV{PATH} while running with -T switch at /usr/bin/pg_ctlcluster line 63. [fail] invoke-rc.d: initscript postgresql-8.4, action "stop" failed. dpkg: error processing /var/cache/apt/archives/postgresql-8.4_8.4.3-1_amd64.deb (--unpack): subprocess new pre-removal script returned error exit status 9 * Starting PostgreSQL 8.4 database server * Insecure directory in $ENV{PATH} while running with -T switch at /usr/bin/pg_ctlcluster line 63. [fail] invoke-rc.d: initscript postgresql-8.4, action "start" failed. dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 9 Errors were encountered while processing: /var/cache/apt/archives/postgresql-8.4_8.4.3-1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
To clean this up remove the postmaster and reset the group and general permissions.
sudo rm /var/lib/postgresql/8.4/main/postmaster.pid sudo chown postgres:postgres /etc/postgresql/8.4/main/environment sudo chmod u+rw,g+rw /etc/postgresql/8.4/main/environment
Bookmark or share this page:
Related posts:
MSN Contact: contact [at] danielgibbs.net
Dan Gibbs is a web developer, designer and SEO consultant involved in devon web design.






roodcah 2 May 2011 9:57 am
thx.. my problem is solved
pangestu 4 July 2011 6:03 pm
tararenkyou…..
suryakant maurya 31 October 2011 12:22 pm
Thanks