Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tJAF1-001G1X-Ak for pgadmin-hackers@arkaria.postgresql.org; Thu, 05 Dec 2024 11:41:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tJAEy-0062YW-8u for pgadmin-hackers@arkaria.postgresql.org; Thu, 05 Dec 2024 11:41:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tJAEy-0062YO-03 for pgadmin-hackers@lists.postgresql.org; Thu, 05 Dec 2024 11:41:53 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tJAEr-001B0b-Ke for pgadmin-hackers@postgresql.org; Thu, 05 Dec 2024 11:41:52 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-53e1be0ec84so1025254e87.1 for ; Thu, 05 Dec 2024 03:41:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin.org; s=google; t=1733398904; x=1734003704; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FP+fHszpzUELl7CLMYiT25i269jTuaVxjmidRMoEL6s=; b=pkHeQu1oh952/fhcQv29Mn8g1Pu/8Mobukk2/Gpd3iU2DbV/qvX0VNyMBi71paAhi0 YQeZEPtKGtRCOHeh42FYmlCkOZ1qeEvjFC0qNYZWJmZNoZVTI0p5bCG/IHPTjjVJLwvE lb3xi2AO8Xfv4RAT1Q7+qSVOW6Ieq40OKxhdLz4jX6adXG1JZ163lFDL5poB5P3qkcUg I+AFIk0xKvCou378DAt1LKIZ2ZjpiQ3XY0kt35sUvYlg0//Gd7GyJ4MAj15b+RXWqbkM +FZoEIIK065WfmmX0bzpLzhfjsnZK5R/2zRTXyo4Wbhl5s/0KtcNEg3BXINfIl4dRSI+ vtWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733398904; x=1734003704; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FP+fHszpzUELl7CLMYiT25i269jTuaVxjmidRMoEL6s=; b=tbLfG5cQKXpWd6R1hObO4Z4tOYQSeJWjffFZvb1rA1CYZN1GE1Gr5iI4eCi6Xg2UkT UlkoiTjKnEeTU8k/l5W9XNVw2cMtn+AbXr0enxCekIquEgY82GSXcPzqOaTcm4vyKWnR K0NCNH90CxUIhVw44LRGICBTJE46qZ6wcxfZoUWnArv0qNNu8D7XO6OxJSujeumuQdTX cXR7SX4KVXLTIQd9yYjpa+bBPtr7u/FWqTX6/jtG2TY0e7DxnB86kQjIQE+pEFw3Uyns kdbFBqnoi0SqaJf3NhDpoLEqgH7/GcqIZcmS/AlqOxFaRaiAv8l6oQZZLLFrOWkL4z/d oIQw== X-Gm-Message-State: AOJu0YwfRirCVt/UMQkZNgn06rulNQnILuCuDAxZ+eytqXP99oX0wQWh /2v2SQl3lDbbdRH46zeS2YR5AQyKEC7N02h7lJEep2HUhaomU4rPWon+d0Icgd/xxXGNm+/bmFV E+BSOR37XxPNIfzF0momGaGnP9KRrYR2IHhKzbn2Xv5UhPSI= X-Gm-Gg: ASbGncsbryjHKhH5hGaFWocBNfc/F6fSpQSYOpyMhQcWcUDYqh4yz+kPEh3L8IH2xmY 5gHE7oIohjdTUfEZEbr5CiraN+5EbO4eDEA== X-Google-Smtp-Source: AGHT+IHz39TxOG3nRsjaN+Y32jmUgTMwvvYCxxnUniwvw7dFzLvnmTUNutQFcClpIWI/4n67O+4m1MvhPkO17Tv6u2U= X-Received: by 2002:a05:6512:b99:b0:536:a52d:f94b with SMTP id 2adb3069b0e04-53e129ed183mr5071110e87.8.1733398904119; Thu, 05 Dec 2024 03:41:44 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Dave Page Date: Thu, 5 Dec 2024 11:41:33 +0000 Message-ID: Subject: Re: Require suggestions on feature #5766 To: Anil Sahoo Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000ef4e8806288461c6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ef4e8806288461c6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Wed, 4 Dec 2024 at 05:19, Anil Sahoo wrote= : > Hi Dave, > > For Windows, I checked how pgAdmin works for machine-wide installations a= s > admin1 (Administrator), and there is another admin user like admin2 > (Administrator), and normal users are user1 and user2. When logged in as > other mentioned users, I was able to use pgAdmin, but when I tried to > upgrade pgAdmin as admin2 from v8.12 to v8.13, I faced the below error: > > "An error occurred while trying to replace the existing file: > > DeleteFile failed; code 5. > > Access is denied." > > And if I cancel installation, then run pgAdmin, v8.12 is getting > corrupted and giving > > "The pgAdmin 4 server could not be contacted: > C:\Program Files (x86)\pgAdmin 4\python\python.exe: can't open file =E2= =80=98 C:\\ > Program Files (x86)\\pgAdmin > > 4\\web\\pgAdmin4.py: [Errno 2] No such file or directory." > > For user-level installation, everything is working fine for different > users. > > I have checked some of the desktop applications that are being built with > Electron, like VS Code and Postman. > > *How VS Code works is,* > > They have 2 different installers, one for user level and another for > system level. > > When I installed the VS Code system installer on admin1, it was working > fine, and I was able to check for updates, and for admin2 and user1, it i= s > available, working fine and able to check for updates, not able to update > as I am in the latest version. (Note: not found system installers for old= er > versions, but user installers are available) > > When I installed the VS Code user installer on admin1, it was working > fine, and VS Code says when running it as an administrator in a user setu= p > installation, updates will be disabled. > > When I tried to install the user installer on user1, it was working fine > and able to check for updates. > > *How Postman works is,* > > When I installed Postman on admin1, it was available for admin2 also. It > was working fine, and checking for auto updates was also working fine for > both admins. It is not available for normal users when installed for admi= ns. > > When I installed Postman for user1, it was available only for the current > user, and checking for updates was working fine. > > So please give your suggestions on which approach to follow. > Postman seems to be a nice model to follow, though it will require us to check if the current user has permissions to update the installation. That might be tricky to get right. I would suggest that for the initial version we simply disable auto-update for machine wide installations, and think about supporting them for admin users in the future when we can properly check that we have the desired permissions. We should also consider changes to the installer - e.g. perhaps make the per-user installation the default, and (if possible) add a note under the machine-wide option to warn the user that auto updates would be disabled. Thanks, Dave. --=20 Dave Page pgAdmin: https://www.pgadmin.org PostgreSQL: https://www.postgresql.org pgEdge: https://www.pgedge.com --000000000000ef4e8806288461c6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Wed, 4 Dec 2024 at 05:19, = Anil Sahoo <anil.sahoo@en= terprisedb.com> wrote:
Hi Dave,

For Windows, I checked how pgAdmin works for machine-wide installations = as admin1 (Administrator), and there is another admin user like admin2 (Adm= inistrator), and normal users are user1 and user2. When logged in as other = mentioned users, I was able to use pgAdmin, but when I tried to upgrade pgA= dmin as admin2 from v8.12 to v8.13, I faced the below error:

"An error occurred while trying to replace the existing file:

DeleteFile failed; code 5.

Access is denied."

=C2=A0And if I cancel installation, then run pgAdmin, v8.12 is getting c= orrupted and giving

"The pgAdmin 4 server could not be contacted:
C:\Program Files (= x86)\pgAdmin 4\python\python.exe: can't open file =E2=80=98 C:\\ Progra= m Files (x86)\\pgAdmin

4\\web\\pgAdmin4.py: [Errno 2] No such file or directory."

Fo= r user-level installation, everything is working fine for different users.<= /p>

I have checked some of the desktop applications that are being built wit= h Electron, like VS Code and Postman.

How VS Code works is,

They have 2 different installers, one for user level and another for sys= tem level.

When I installed the VS Code system installer on admin1, it was working = fine, and I was able to check for updates, and for admin2 and user1, it is = available, working fine and able to check for updates, not able to update a= s I am in the latest version. (Note: not found system installers for older = versions, but user installers are available)

When I installed the VS Code user installer on admin1, it was working fi= ne, and VS Code says when running it as an administrator in a user setup in= stallation, updates will be disabled.

When I tried to install the user installer on user1, it was working fine= and able to check for updates.

How Postman works is,

When I installed Postman on admin1, it was available for admin2 also. It= was working fine, and checking for auto updates was also working fine for = both admins. It is not available for normal users when installed for admins= .

When I installed Postman for user1, it was available only for the curren= t user, and checking for updates was working fine.

So please give your suggestions on which approach to follow.

Postman seems to be a nice model to follow, though it will = require us to check if the current user has permissions to update the insta= llation. That might be tricky to get right.

I woul= d suggest that for the initial version we simply disable auto-update for ma= chine wide installations, and think about supporting them for admin users i= n the future when we can properly check that we have the desired permission= s. We should also consider changes to the installer - e.g. perhaps make the= per-user installation the default, and (if possible) add a note under the = machine-wide option to warn the user that auto updates would be disabled.

Thanks, Dave.=C2=A0

<= span class=3D"gmail_signature_prefix">--
--000000000000ef4e8806288461c6--