strange permission errors

strange permission errors

am 11.03.2008 01:09:36 von Mag Gam

------=_Part_26451_11505569.1205194181269
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Gurus:

Moving my application from development to production server. For some
reason, I can't seem to execute my application when using mod_perl in
production. I keep getting this permission error:
[Mon Mar 10 13:47:33 2008] [error] Can't call method "prepare" on an
undefined value at /var/www/:app/index.pl line 26.\n
DBI connect('testdb','dbusr',...) failed: Couldn't connect to
/tmp/.s.PGSQL.5432: connect: Permission denied at
/usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124
at /var/www/app/index.pl line 24
[Mon Mar 10 18:49:19 2008] [error] Can't call method "prepare" on an
undefined value at /var/www/app/index.pl line 26.\n
DBI connect('testdb','dbusr',...) failed: Couldn't connect to
/tmp/.s.PGSQL.5432: connect: Permission denied at
/usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124
at /var/www/app/index.pl line 24
[Mon Mar 10 20:05:36 2008] [error] Can't call method "prepare" on an
undefined value at /var/www/app/index.pl line 26.\n



I am able to connect to my database using, psql -U dbusr testdb without any
problems. I actually gave my user and database full DB access. When I run
the program via CLI, it works. just not working thru mod_perl. Any
suggestions?

TIA

------=_Part_26451_11505569.1205194181269
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Gurus:

Moving my application from development to production server. For some reason, I can't seem to execute my application when using mod_perl in production. I keep getting this permission error:
[Mon Mar 10 13:47:33 2008] [error] Can't call method "prepare" on an undefined value at /var/www/:app/index.pl line 26.\n

DBI connect('testdb','dbusr',...) failed: Couldn't connect to /tmp/.s.PGSQL.5432: connect: Permission denied at /usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124
 at /var/www/app/index.pl line 24

[Mon Mar 10 18:49:19 2008] [error] Can't call method "prepare" on an undefined value at /var/www/app/index.pl line 26.\n
DBI connect('testdb','dbusr',...) failed: Couldn't connect to /tmp/.s.PGSQL.5432: connect: Permission denied at /usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124

 at /var/www/app/index.pl line 24
[Mon Mar 10 20:05:36 2008] [error] Can't call method "prepare" on an undefined value at /var/www/app/index.pl line 26.\n



I am able to connect to my database using, psql -U dbusr testdb without any problems. I actually gave my user and database full DB access. When I run the program via CLI, it works. just not working thru mod_perl. Any suggestions?


TIA



------=_Part_26451_11505569.1205194181269--

Re: strange permission errors

am 11.03.2008 06:55:59 von gozer

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCC65ECEF2610BB2BB398B341
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Mag Gam wrote:
> Hi Gurus:
>=20
> Moving my application from development to production server. For some=20
> reason, I can't seem to execute my application when using mod_perl in=20
> production. I keep getting this permission error:
> [Mon Mar 10 13:47:33 2008] [error] Can't call method "prepare" on an=20
> undefined value at /var/www/:app/index.pl line 26.\n
> DBI connect('testdb','dbusr',...) failed: Couldn't connect to=20
> /tmp/.s.PGSQL.5432: connect: Permission denied at=20
> /usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124
> at /var/www/app/index.pl line 24
> [Mon Mar 10 18:49:19 2008] [error] Can't call method "prepare" on an=20
> undefined value at /var/www/app/index.pl line 26.\n
> DBI connect('testdb','dbusr',...) failed: Couldn't connect to=20
> /tmp/.s.PGSQL.5432: connect: Permission denied at=20
> /usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124
> at /var/www/app/index.pl line 24
> [Mon Mar 10 20:05:36 2008] [error] Can't call method "prepare" on an=20
> undefined value at /var/www/app/index.pl line 26.\n

httpd runs as a non-root user, usually 'httpd' or 'apache'.

Can that user access the PosgreSQL named pipe: /tmp/.s.PGSQL.5432

$> su apache -c '/bin/ls /tmp/.s.PGSQL.5432'

Should give you an idea what's up.

--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/


--------------enigCC65ECEF2610BB2BB398B341
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH1h7vyzKhB4jDpaURAnXgAJ4hnOnEyTAc6NX9V6SQNgBp0mRs5gCg pUTG
emvjOf6lcCMv/vbPOTl/s48=
=K1+X
-----END PGP SIGNATURE-----

--------------enigCC65ECEF2610BB2BB398B341--

Re: strange permission errors

am 11.03.2008 13:24:05 von Mag Gam

------=_Part_1295_16907944.1205238245442
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I get," The account is not currently available."

But this happens on good and bad configuration. The system it works on gives
me this error too..

Any other suggestion? The only difference I see is, in production I am using
mod_perl 1.99

On Tue, Mar 11, 2008 at 1:55 AM, Philippe M. Chiasson
wrote:

> Mag Gam wrote:
> > Hi Gurus:
> >
> > Moving my application from development to production server. For some
> > reason, I can't seem to execute my application when using mod_perl in
> > production. I keep getting this permission error:
> > [Mon Mar 10 13:47:33 2008] [error] Can't call method "prepare" on an
> > undefined value at /var/www/:app/index.pl line 26.\n
> > DBI connect('testdb','dbusr',...) failed: Couldn't connect to
> > /tmp/.s.PGSQL.5432: connect: Permission denied at
> > /usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124
> > at /var/www/app/index.pl line 24
> > [Mon Mar 10 18:49:19 2008] [error] Can't call method "prepare" on an
> > undefined value at /var/www/app/index.pl line 26.\n
> > DBI connect('testdb','dbusr',...) failed: Couldn't connect to
> > /tmp/.s.PGSQL.5432: connect: Permission denied at
> > /usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124
> > at /var/www/app/index.pl line 24
> > [Mon Mar 10 20:05:36 2008] [error] Can't call method "prepare" on an
> > undefined value at /var/www/app/index.pl line 26.\n
>
> httpd runs as a non-root user, usually 'httpd' or 'apache'.
>
> Can that user access the PosgreSQL named pipe: /tmp/.s.PGSQL.5432
>
> $> su apache -c '/bin/ls /tmp/.s.PGSQL.5432'
>
> Should give you an idea what's up.
>
> --
> Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
> http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
>
>

------=_Part_1295_16907944.1205238245442
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I get," The account is not currently available."

But this happens on good and bad configuration. The system it works on gives me this error too..

Any other suggestion? The only difference I see is, in production I am using mod_perl 1.99


On Tue, Mar 11, 2008 at 1:55 AM, Philippe M. Chiasson <> wrote:

Mag Gam wrote:

> Hi Gurus:

>

> Moving my application from development to production server. For some

> reason, I can't seem to execute my application when using mod_perl in

> production. I keep getting this permission error:

> [Mon Mar 10 13:47:33 2008] [error] Can't call method "prepare" on an

> undefined value at /var/www/:app/index.pl line 26.\n

> DBI connect('testdb','dbusr',...) failed: Couldn't connect to

> /tmp/.s.PGSQL.5432: connect: Permission denied at

> /usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124

>  at /var/www/app/index.pl line 24

> [Mon Mar 10 18:49:19 2008] [error] Can't call method "prepare" on an

> undefined value at /var/www/app/index.pl line 26.\n

> DBI connect('testdb','dbusr',...) failed: Couldn't connect to

> /tmp/.s.PGSQL.5432: connect: Permission denied at

> /usr/lib/perl5/site_perl/5.8.5/DBD/PgPP.pm line 124

>  at /var/www/app/index.pl line 24

> [Mon Mar 10 20:05:36 2008] [error] Can't call method "prepare" on an

> undefined value at /var/www/app/index.pl line 26.\n



httpd runs as a non-root user, usually 'httpd' or 'apache'.



Can that user access the PosgreSQL named pipe: /tmp/.s.PGSQL.5432



$> su apache -c '/bin/ls /tmp/.s.PGSQL.5432'



Should give you an idea what's up.



--

Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5

      m/gozer\@(apache|cpan|ectoplasm)\.org/






------=_Part_1295_16907944.1205238245442--

Re: strange permission errors

am 11.03.2008 19:47:11 von gozer

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig5F9318A82362DA3755D75E0F
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable



Mag Gam wrote:
> I get," The account is not currently available."

That account has a disabled shell

$> su apache -s `which sh` -c '/bin/ls /tmp/.s.PGSQL.5432'

Look at the permissions on both /tmp and /tmp/.s.PGSQL.5432

$> ls -ld /tmp
$> ls -l /tmp/.s.PGSQL.5432

--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/


--------------enig5F9318A82362DA3755D75E0F
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH1tO1yzKhB4jDpaURAiYmAKC0Yl5emPVsSxfCSdqhIwbBUSPPIQCf XfeV
t1P6vVN30qnR5lUiJHf2nfE=
=mWpO
-----END PGP SIGNATURE-----

--------------enig5F9318A82362DA3755D75E0F--

Re: strange permission errors

am 17.03.2008 20:23:49 von Mag Gam

------=_Part_12031_24486003.1205781829189
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Phillip:

The permissions are fine. I have default permissions for the Unix Socket. It
matched other postgresql installs, and other systems that work. Plus its the
default setting (srwxrwxrwx)..I still can't figure out why I am having this
problem...

Any help would be helpful


On Tue, Mar 11, 2008 at 2:47 PM, Philippe M. Chiasson
wrote:

>
>
> Mag Gam wrote:
> > I get," The account is not currently available."
>
> That account has a disabled shell
>
> $> su apache -s `which sh` -c '/bin/ls /tmp/.s.PGSQL.5432'
>
> Look at the permissions on both /tmp and /tmp/.s.PGSQL.5432
>
> $> ls -ld /tmp
> $> ls -l /tmp/.s.PGSQL.5432
>
> --
> Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
> http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
>
>

------=_Part_12031_24486003.1205781829189
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Phillip:

The permissions are fine. I have default permissions for the Unix Socket. It matched other postgresql installs, and other systems that work. Plus its the default setting (srwxrwxrwx)..I still can't figure out why I am having this problem...


Any help would be helpful


On Tue, Mar 11, 2008 at 2:47 PM, Philippe M. Chiasson <> wrote:





Mag Gam wrote:

> I get," The account is not currently available."



That account has a disabled shell



$> su apache -s `which sh` -c '/bin/ls /tmp/.s.PGSQL.5432'



Look at the permissions on both /tmp and /tmp/.s.PGSQL.5432



$> ls -ld /tmp

$> ls -l /tmp/.s.PGSQL.5432



--

Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5

      m/gozer\@(apache|cpan|ectoplasm)\.org/






------=_Part_12031_24486003.1205781829189--