Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D3854632C61 for ; Sat, 5 Sep 2009 08:31:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43482-01 for ; Sat, 5 Sep 2009 11:30:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tinlc.com (unknown [72.18.206.65]) by mail.postgresql.org (Postfix) with ESMTP id CCE5A632653 for ; Sat, 5 Sep 2009 08:30:52 -0300 (ADT) Received: from biglumber.com ([72.18.206.64] helo=localhost) by tinlc.com with smtp (Exim 4.60) (envelope-from ) id 1MjtTP-0002XU-TI; Sat, 05 Sep 2009 06:30:27 -0500 From: "Greg Sabino Mullane" To: pgsql-interfaces@postgresql.org Subject: Re: problem on test perlu trigger function. X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: <4AA1F495.2050602@gmail.com> Date: Sat, 5 Sep 2009 11:30:27 -0000 X-Mailer: JoyMail 2.01 Message-ID: <6f8c66fd5a3c12667eff14d54a398d70@biglumber.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.499 tagged_above=-10 required=5 tests=BAYES_00=-2.599, RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200909/2 X-Sequence-Number: 6881 -----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@turnstep.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-----