|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
problem on test perlu trigger function.Hello,
I have a problem on a test directory on my trigger function. For information, i use a 8.0.21 version of perl. To make things simple, i make a perlu function trigger on when i modify a row, i try to test the existence of a directory. I have the impression that this test does not work :-( my function... .. 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? Vic -- Sent via pgsql-interfaces mailing list (pgsql-interfaces@...) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-interfaces |
|
|
Re: problem on test perlu trigger function.-----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@... End Point Corporation PGP Key: 0x14964AC8 200909050729 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAkqiS88ACgkQvJuQZxSWSshetgCbB3ao2kGembYXswSu7fQ77NFH 4lEAoMfBRsbbNMg4g8wSgIJ6iE+mhFHC =esTM -----END PGP SIGNATURE----- -- Sent via pgsql-interfaces mailing list (pgsql-interfaces@...) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-interfaces |
|
|
Re: problem on test perlu trigger function.
:-[ I am stupid,
it is obvious !
Really you are right :-D , script is thrown with the rights of account postgres and it does not have the rights to browse this directory ... Your proposal of the "mkdir -p" seems to me the better solution ! Still thank you for this analysis ! However, i have an other problem and I am going to open new thread. And that there seems to me a little more crooked... Vic :-) Greg Sabino Mullane a écrit : -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 |
| Free embeddable forum powered by Nabble | Forum Help |