pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <greg@turnstep.com>
To: pgsql-interfaces@postgresql.org
Subject: Re: problem on test perlu trigger function.
Date: Sat,  5 Sep 2009 11:30:27 -0000
Message-ID: <6f8c66fd5a3c12667eff14d54a398d70@biglumber.com> (raw)
In-Reply-To: <4AA1F495.2050602@gmail.com>


-----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-----





view thread (3+ messages)  latest in thread

Message-ID: <6f8c66fd5a3c12667eff14d54a398d70@biglumber.com>
Permalink:  ../6f8c66fd5a3c12667eff14d54a398d70@biglumber.com/
Also on:    postgresql.org/message-id/6f8c66fd5a3c12667eff14d54a398d70@biglumber.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: greg@turnstep.com
  Subject: Re: problem on test perlu trigger function.
  In-Reply-To: <6f8c66fd5a3c12667eff14d54a398d70@biglumber.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox