Re: [GENERAL] How to stop script executions

2016-07-26 Thread Dev Kumkar
On Tue, Jul 26, 2016 at 7:53 PM, John McKown wrote: > I agree. From my reading at: > https://www.postgresql.org/docs/9.5/static/sql-copy.html the COPY FROM > PROGRAM is only available to a PostgreSQL user who is database superuser. > That, sort of, implies to me

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Dev Kumkar
On Tue, Jul 26, 2016 at 7:49 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > ​For superusers, no. You'd have to protect the system using external > tools to limit what areas and commands the postgres (or whatever PostgreSQL > runs as) user ​can access. > Thanks David for the

Re: [GENERAL] How to stop script executions

2016-07-26 Thread John McKown
On Tue, Jul 26, 2016 at 9:05 AM, Melvin Davidson wrote: > > > On Tue, Jul 26, 2016 at 9:52 AM, Dev Kumkar > wrote: > >> On Tue, Jul 26, 2016 at 6:59 PM, David G. Johnston < >> david.g.johns...@gmail.com> wrote: >> >>> ​Typically this means that

Re: [GENERAL] How to stop script executions

2016-07-26 Thread David G. Johnston
On Tue, Jul 26, 2016 at 9:48 AM, Dev Kumkar wrote: > On Tue, Jul 26, 2016 at 6:54 PM, David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> ​Superuser: yes (specifically I'm thinking the COPY FROM PROGRAM command, >> but also C language functions) >> Ordinary

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Melvin Davidson
On Tue, Jul 26, 2016 at 9:52 AM, Dev Kumkar wrote: > On Tue, Jul 26, 2016 at 6:59 PM, David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> ​Typically this means that given user only having psql, or some other >> backend protocol only, connect to the database are

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Dev Kumkar
On Tue, Jul 26, 2016 at 6:59 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > ​Typically this means that given user only having psql, or some other > backend protocol only, connect to the database are they able to execute > arbitrary commands as the user running the PostgreSQL process

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Dev Kumkar
On Tue, Jul 26, 2016 at 6:54 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > ​Superuser: yes (specifically I'm thinking the COPY FROM PROGRAM command, > but also C language functions) > Ordinary user: not that I can think of. > OK, is there a way to restrict usage of COPY FROM

Re: [GENERAL] How to stop script executions

2016-07-26 Thread David G. Johnston
On Tue, Jul 26, 2016 at 9:21 AM, Sameer Kumar wrote: > >> Yeah these extensions are not present, are their any chances of running >> OS commands from database? >> > > What do you mean by "from database"? I think you need to lay down your > requirement and goal more

Re: [GENERAL] How to stop script executions

2016-07-26 Thread David G. Johnston
On Tue, Jul 26, 2016 at 9:19 AM, Dev Kumkar wrote: > On Tue, Jul 26, 2016 at 6:35 PM, David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> The way to go about prohibiting their usage altogether is specific to >> your installation method. But by default those

Re: [GENERAL] How to stop script executions

2016-07-26 Thread David G. Johnston
On Tue, Jul 26, 2016 at 9:16 AM, Alex Ignatov wrote: > revoke usage on language plpythonu from username; > > revoke usage on language plperl(u) from username; > Actually, the usage permission for an untrusted language appears to be pointless. Only superusers can create

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Sameer Kumar
On Tue, 26 Jul 2016, 9:20 p.m. Dev Kumkar, wrote: > On Tue, Jul 26, 2016 at 6:29 PM, Sameer Kumar > wrote: > > You mean you don't want any routines/functions written in Pl/perl or >> PL/pythin to get executed? >> >> If that is what you are

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Dev Kumkar
On Tue, Jul 26, 2016 at 6:29 PM, Sameer Kumar wrote: You mean you don't want any routines/functions written in Pl/perl or > PL/pythin to get executed? > > If that is what you are looking for them simply drop the extension for > these languages or deny privilege to

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Dev Kumkar
On Tue, Jul 26, 2016 at 6:35 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > The way to go about prohibiting their usage altogether is specific to your > installation method. But by default those languages are not installed into > newly created databases and only a superuser can

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Alex Ignatov
revoke usage on language plpythonu from username; revoke usage on language plperl(u) from username; Alex Ignatov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company On 26.07.2016 16:05, David G. Johnston wrote: On Tue, Jul 26, 2016 at 8:53 AM, Dev Kumkar

Re: [GENERAL] How to stop script executions

2016-07-26 Thread David G. Johnston
On Tue, Jul 26, 2016 at 8:53 AM, Dev Kumkar wrote: > Hello Experts, > > I want to have my postgreSQL database to only execute SQLs and avoid > execution of perl and python script executions. > > Can you please suggest ways to achieve this? > > The way to go about

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Sameer Kumar
On Tue, 26 Jul 2016, 8:54 p.m. Dev Kumkar, wrote: > Hello Experts, > > I want to have my postgreSQL database to only execute SQLs and avoid > execution of perl and python script executions. > You mean you don't want any routines/functions written in Pl/perl or PL/pythin

[GENERAL] How to stop script executions

2016-07-26 Thread Dev Kumkar
Hello Experts, I want to have my postgreSQL database to only execute SQLs and avoid execution of perl and python script executions. Can you please suggest ways to achieve this? Regards...