Thread: [pgAdmin][RM5521] pgAdmin dump servers issue in desktop mode
Attachment
PermissionError: [Errno 13] Permission denied: '/var/lib/pgadmin'
Hi Hackers,Attached is the patch to:1) Fix an issue when dumping servers from a desktop pgAdmin app by providing an option --sqlite-path. This will allow the user to dump a specific config db file.2) While there is an option for --sqlite-path now, the other paths for session, storage, etc. were failing with permission errors. Code is changed to not to bother those directories when dumping or loading servers.3) Improved --help for setup.py.4) Docs updated.Please review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"
Hi AdityaWhen I run setup.py and specify the --sqlite-path parameter like below:python setup.py --sqlite-path "/Users/akshayjoshi/Downloads/pgadmin4-dev-env.db" --dump-servers output.jsonI got the following error:PermissionError: [Errno 13] Permission denied: '/var/lib/pgadmin'
Please fix it and resend the patch.On Thu, May 28, 2020 at 2:39 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to:1) Fix an issue when dumping servers from a desktop pgAdmin app by providing an option --sqlite-path. This will allow the user to dump a specific config db file.2) While there is an option for --sqlite-path now, the other paths for session, storage, etc. were failing with permission errors. Code is changed to not to bother those directories when dumping or loading servers.3) Improved --help for setup.py.4) Docs updated.Please review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246
Attachment
python setup.py --sqlite-path "/Users/akshayjoshi/Downloads/pgadmin4-de.db" --dump-servers output.json
----
Dumping servers with:
User: pgadmin4@pgadmin.org
SQLite pgAdmin config: /Users/akshayjoshi/Downloads/pgadmin4-de.db
----
NOTE: Configuring authentication for SERVER mode.
Enter the email address and password to use for the initial pgAdmin user account:
Email address: a.j@edb.com
Password:
Retype password:
The specified user ID (pgadmin4@pgadmin.org) could not be found.
Hi Hackers,Attached is the updated patch. Please review.On Thu, May 28, 2020 at 5:38 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi AdityaWhen I run setup.py and specify the --sqlite-path parameter like below:python setup.py --sqlite-path "/Users/akshayjoshi/Downloads/pgadmin4-dev-env.db" --dump-servers output.jsonI got the following error:PermissionError: [Errno 13] Permission denied: '/var/lib/pgadmin'
Please fix it and resend the patch.On Thu, May 28, 2020 at 2:39 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to:1) Fix an issue when dumping servers from a desktop pgAdmin app by providing an option --sqlite-path. This will allow the user to dump a specific config db file.2) While there is an option for --sqlite-path now, the other paths for session, storage, etc. were failing with permission errors. Code is changed to not to bother those directories when dumping or loading servers.3) Improved --help for setup.py.4) Docs updated.Please review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"
Hi AdityaWhen I provide the wrong path of the SQLite DB file then it should not ask me an email address and password.python setup.py --sqlite-path "/Users/akshayjoshi/Downloads/pgadmin4-de.db" --dump-servers output.json
----
Dumping servers with:
User: pgadmin4@pgadmin.org
SQLite pgAdmin config: /Users/akshayjoshi/Downloads/pgadmin4-de.db
----
NOTE: Configuring authentication for SERVER mode.
Enter the email address and password to use for the initial pgAdmin user account:
Email address: a.j@edb.com
Password:
Retype password:
The specified user ID (pgadmin4@pgadmin.org) could not be found.
Please fix it and resend the patch. Test all the negative/positive scenarios.On Thu, May 28, 2020 at 6:17 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the updated patch. Please review.On Thu, May 28, 2020 at 5:38 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi AdityaWhen I run setup.py and specify the --sqlite-path parameter like below:python setup.py --sqlite-path "/Users/akshayjoshi/Downloads/pgadmin4-dev-env.db" --dump-servers output.jsonI got the following error:PermissionError: [Errno 13] Permission denied: '/var/lib/pgadmin'
Please fix it and resend the patch.On Thu, May 28, 2020 at 2:39 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to:1) Fix an issue when dumping servers from a desktop pgAdmin app by providing an option --sqlite-path. This will allow the user to dump a specific config db file.2) While there is an option for --sqlite-path now, the other paths for session, storage, etc. were failing with permission errors. Code is changed to not to bother those directories when dumping or loading servers.3) Improved --help for setup.py.4) Docs updated.Please review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246
Attachment
Hi Akshay,Attached is the updated patch which hopefully works for all cases. :)Whenever a wrong file, wrong path or some other non pgAdmin db file is provided then it will throw a message - "SQLite pgAdmin config DB file is not valid".Please review.On Fri, May 29, 2020 at 11:28 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi AdityaWhen I provide the wrong path of the SQLite DB file then it should not ask me an email address and password.python setup.py --sqlite-path "/Users/akshayjoshi/Downloads/pgadmin4-de.db" --dump-servers output.json
----
Dumping servers with:
User: pgadmin4@pgadmin.org
SQLite pgAdmin config: /Users/akshayjoshi/Downloads/pgadmin4-de.db
----
NOTE: Configuring authentication for SERVER mode.
Enter the email address and password to use for the initial pgAdmin user account:
Email address: a.j@edb.com
Password:
Retype password:
The specified user ID (pgadmin4@pgadmin.org) could not be found.
Please fix it and resend the patch. Test all the negative/positive scenarios.On Thu, May 28, 2020 at 6:17 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the updated patch. Please review.On Thu, May 28, 2020 at 5:38 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi AdityaWhen I run setup.py and specify the --sqlite-path parameter like below:python setup.py --sqlite-path "/Users/akshayjoshi/Downloads/pgadmin4-dev-env.db" --dump-servers output.jsonI got the following error:PermissionError: [Errno 13] Permission denied: '/var/lib/pgadmin'
Please fix it and resend the patch.On Thu, May 28, 2020 at 2:39 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to:1) Fix an issue when dumping servers from a desktop pgAdmin app by providing an option --sqlite-path. This will allow the user to dump a specific config db file.2) While there is an option for --sqlite-path now, the other paths for session, storage, etc. were failing with permission errors. Code is changed to not to bother those directories when dumping or loading servers.3) Improved --help for setup.py.4) Docs updated.Please review.--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"--Thanks & RegardsAkshay JoshiSr. Software ArchitectEnterpriseDB Software India Private LimitedMobile: +91 976-788-8246--Thanks and Regards,Aditya ToshniwalpgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune"Don't Complain about Heat, Plant a TREE"