Re: Change Storage Dir

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: "Silvera, Ignacio" <ignacio(dot)silvera(at)atos(dot)net>
Cc: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>, "pgadmin-support(at)lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: Change Storage Dir
Date: 2017-10-09 15:26:50
Message-ID: CAG7mmozgL6H1HRwWF9+y5DDAzv99w4UCtY+ZncKSnwo3v=GfgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Mon, Oct 9, 2017 at 8:52 PM, Silvera, Ignacio <ignacio(dot)silvera(at)atos(dot)net>
wrote:

> Another question more.
>
> Is it possible to set a storage dir for a group of users of pgadmin and
> other storage dir for other groups of users?
>
Technically not feasible, as running pgAdmin 4 (as web application) will
run under a web-server (i.e. httpd) will always run under a particular user.
Hence - setting different storage dir for different group of users will not
be possible, as it won't accessible.

-- Thanks, Ashesh

> Thanks!
>
> [image: blue_strip]
>
> *Ignacio Silvera*
>
> B&PS (Business & Platform Solutions) – Atos Uruguay
>
> Tel: +598 24871169, int 102
>
> ignacio(dot)silvera(at)atos(dot)net
>
> Luis A. de Herrera 2802
>
> Montevideo, Uruguay
>
> Atos.net
>
> [image: atos_logotype]
>
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive this
> e-mail in error, please notify the sender immediately and destroy it. As
> its integrity cannot be secured on the Internet, the Atos group liability
> cannot be triggered for the message content. Although the sender endeavors
> to maintain a computer virus-free network, the sender does not warrant that
> this transmission is virus-free and will not be liable for any damages
> resulting from any virus transmitted.
>
>
> El 09/10/17 a las 12:17, Murtuza Zabuawala escribió:
>
> STORAGE_DIR is a base directory.
> pgAdmin4 will automatically create separate user directory for each user
> in given base directory.
>
>
> On Mon, Oct 9, 2017 at 8:41 PM, Silvera, Ignacio <ignacio(dot)silvera(at)atos(dot)net
> > wrote:
>
>> Hi! Thanks for your answers.
>>
>> I will try that.
>>
>> Is there some way to get the login user and relate it with the storage
>> dir? I'm not a python expert, but I suppose that you can get the login
>> username with some python call?
>>
>> That will be the strawberry cake.
>>
>> Regards
>>
>> [image: blue_strip]
>>
>> *Ignacio Silvera*
>>
>> B&PS (Business & Platform Solutions) – Atos Uruguay
>>
>> Tel: +598 24871169, int 102
>>
>> ignacio(dot)silvera(at)atos(dot)net
>>
>> Luis A. de Herrera 2802
>>
>> Montevideo, Uruguay
>>
>> Atos.net
>>
>> [image: atos_logotype]
>>
>> This e-mail and the documents attached are confidential and intended
>> solely for the addressee; it may also be privileged. If you receive this
>> e-mail in error, please notify the sender immediately and destroy it. As
>> its integrity cannot be secured on the Internet, the Atos group liability
>> cannot be triggered for the message content. Although the sender endeavors
>> to maintain a computer virus-free network, the sender does not warrant that
>> this transmission is virus-free and will not be liable for any damages
>> resulting from any virus transmitted.
>>
>>
>> El 09/10/17 a las 11:39, Ashesh Vashi escribió:
>>
>> On Mon, Oct 9, 2017 at 8:05 PM, Murtuza Zabuawala <
>> murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>>
>>> You can customize the locations as per your need,
>>>
>>> Create a file named config_local.py (if not already present) at your
>>> installation location ../pgadmin4/web/
>>> and add below line in it, restart pgAdmin4 and you are good to go.
>>>
>>> STORAGE_DIR = '/home/backups'
>>>
>> Make sure - that directory is accessible from the operating system user
>> running the web-server.
>>
>> -- Thanks, Ashesh
>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Murtuza Zabuawala
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>>
>>> On Mon, Oct 9, 2017 at 7:56 PM, Silvera, Ignacio <
>>> ignacio(dot)silvera(at)atos(dot)net> wrote:
>>>
>>>>
>>>> I'm internalizing on pgAdmin4 installed by python wheels on Ubuntu and
>>>> making some customization on it.
>>>>
>>>> We run it in Server Mode and, we had created one email user to each DBA
>>>> and one user for all the operators. For example, Jhon Snow got the email
>>>> jhon(dot)snow(at)pgadmin(dot)com and he is a DBA. Maria Snow is Operator and his
>>>> username to login to pgadmin is operators(at)pgadmin(dot)com(dot) All DBAs and
>>>> Operatos had their own user on the Server, so they can login.
>>>>
>>>> Basically we need to setup a new storage directory, only to save
>>>> backups. I was investigating and the storage directory is under Data
>>>> directory, but in our case, it is not an option, because the data dir is
>>>> under root directory.
>>>>
>>>> Is it possible to set, a different directory to storage backups shared
>>>> to all system users? For example DATA_DIR should be still under root, but
>>>> the backups, must be saved under /home/backups/.
>>>>
>>>> Is it possible? Also for a future improvements, we want to separate
>>>> operator's backup of DBAs' backups. Ex: operators' backups:
>>>> /home/backups/operators/ dbas' backups: /home/backups/dba/
>>>>
>>>> If something is not clear, please let me know. I'm able to modify
>>>> python code.
>>>>
>>>> Thanks
>>>>
>>>> Regards
>>>> --
>>>>
>>>> [image: blue_strip]
>>>>
>>>> *Ignacio Silvera*
>>>>
>>>> B&PS (Business & Platform Solutions) – Atos Uruguay
>>>>
>>>> Tel: +598 24871169, int 102
>>>>
>>>> ignacio(dot)silvera(at)atos(dot)net
>>>>
>>>> Luis A. de Herrera 2802
>>>>
>>>> Montevideo, Uruguay
>>>>
>>>> Atos.net
>>>>
>>>> [image: atos_logotype]
>>>>
>>>> This e-mail and the documents attached are confidential and intended
>>>> solely for the addressee; it may also be privileged. If you receive this
>>>> e-mail in error, please notify the sender immediately and destroy it. As
>>>> its integrity cannot be secured on the Internet, the Atos group liability
>>>> cannot be triggered for the message content. Although the sender endeavors
>>>> to maintain a computer virus-free network, the sender does not warrant that
>>>> this transmission is virus-free and will not be liable for any damages
>>>> resulting from any virus transmitted.
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message David Gilman 2017-10-09 16:48:36 Re: pgadmin4 exception: session['_id'] not in self.managers
Previous Message Silvera, Ignacio 2017-10-09 15:22:34 Re: Change Storage Dir