2

For one of my projects, I had to install the PostgreSQL server. I followed all the necessary steps and the server was installed successfully.

Nevertheless, when I am trying to run SQL Shell (psql) it does not allow me to access the database. Literally, there is no way to enter a password even.

The following error message is returned.

Server [localhost]:
Database [postgres]:
Port [5432]:
Username [postgres]:
find: /c/$Recycle.Bin/S-1-5-18: Permission denied
find: /c/$Recycle.Bin/S-1-5-21-3320971116-995851149-3955206659-1001: Permission denied
find: /c/inetpub/history: Permission denied
find: /c/inetpub/logs: Permission denied
find: /c/inetpub/temp/appPools: Permission denied
find: /c/inetpub/temp/ASP Compiled Templates: Permission denied
find: /c/inetpub/temp/IIS Temporary Compressed Files: Permission denied
find: /c/pagefile.sys: Permission denied
find: /c/Program Files/Microsoft SQL Server/130/Shared/ErrorDumps: Permission denied
find: /c/Program Files/Microsoft SQL Server/150/DTS/DataDumps: Permission denied
find: /c/Program Files/Microsoft SQL Server/150/Shared/ErrorDumps: Permission denied
find: /c/Program Files/Microsoft SQL Server/MSSQL15.MSSQLSERVER/MSSQL/Backup: Permission denied
find: /c/Program Files/Microsoft SQL Server/MSSQL15.MSSQLSERVER/MSSQL/Binn/Xtp: Permission denied
find: /c/Program Files/Microsoft SQL Server/MSSQL15.MSSQLSERVER/MSSQL/DATA: Permission denied
find: /c/Program Files/Microsoft SQL Server/MSSQL15.MSSQLSERVER/MSSQL/JOBS: Permission denied
find: /c/Program Files/Microsoft SQL Server/MSSQL15.MSSQLSERVER/MSSQL/Log: Permission denied
find: /c/Program Files/SoftEther VPN Client/backup.vpn_client.config: Permission denied
find: /c/Program Files/WindowsApps: Permission denied
find: /c/Program Files (x86)/Common Files/Adobe/Adobe PCD: Permission denied
find: /c/Program Files (x86)/Common Files/Adobe/caps: Permission denied

I tried to search the above error and possible causes in PostgreSQL forums but got no result.

I am grateful if somebody can please help me to resolve this issue. :)

Thank you for your valuable time...

PS: I already tried the following steps.

  1. restart SQL server from services
  2. run the following command in cmd (in PostgreSQL bin directory). "psql.exe -U postgres -h localhost -p 5432" The above command provides temporary access to DB through cmd, but still, I get the same above error when using the SQL shell
Pawara Siriwardhane
  • 1,873
  • 10
  • 26
  • 38
  • 1
    You seem to mixing up the MS program SQL Server with Postgresql. Are you sure the SQL shell you are using is the one for Postgresql? – Adrian Klaver Oct 25 '20 at 14:50
  • Yes, Mr. Adrian Klaver. I used the "SQL shell (psql)". – Pawara Siriwardhane Oct 26 '20 at 01:29
  • Well, if the batch file doesn't work, but "plain" `psql` does, then don't use the batch file. The `psql` call doesn't provide "temporary access" - it's essentially the same thing, that batch file tries to run. –  Oct 26 '20 at 07:43
  • 2
    Also ran into similar (almost identical) errors with PostgreSQL 12 under Windows 10. `Server [localhost]:` `Database [postgres]:` `Port [5432]:` `Username [postgres]:` `find: '/c/$Recycle.Bin/S-1-5-18': Permission denied` `find: '/c/$Recycle.Bin/S-1-5-21-....': Permission denied` `find: '/c/$Recycle.Bin/S-1-5-21-...': Permission denied` `find: '/c/$Recycle.Bin/S-1-5-21-...': Permission denied` `find: '/c/$Recycle.Bin/S-1-5-21-...': Permission denied` `find: '/c/Config.Msi': Permission denied` `find: '/c/Intel/IntelOptaneData': Permission denied` – GWD May 24 '21 at 18:06

0 Answers0