Re: problem on test perlu trigger function.

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: problem on test perlu trigger function.
Date: 2009-09-05 11:30:27
Message-ID: 6f8c66fd5a3c12667eff14d54a398d70@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> if (! -d "$PATHBASE/$_TD->{new}{categorie}") {
> `sudo -u http mkdir "$PATHBASE/$_TD->{new}{categorie}"`;
> }

> Sudo function is performed in spite of the presence of directory ! It as
> if "-d" serve has nothing...
>
> Anybody knows why?

Because the directory is created and owned by the http user, but is not
visible to the process that runs this function (postgres). One solution
would be to skip the test and call mkdir -p. Another would be to set
the permissions so that the postgres user can see the directories
inside of $PATHBASE.

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
End Point Corporation
PGP Key: 0x14964AC8 200909050729
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkqiS88ACgkQvJuQZxSWSshetgCbB3ao2kGembYXswSu7fQ77NFH
4lEAoMfBRsbbNMg4g8wSgIJ6iE+mhFHC
=esTM
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Piaff33z 2009-09-05 17:53:13 Re: problem on test perlu trigger function.
Previous Message Piaff33z 2009-09-05 05:18:13 problem on test perlu trigger function.