I'm trying to configure an external formatter for SQL queries in DBeaver, but I'm encountering a "permission denied" error. I'm not very experienced with the command line and just started learning Linux, so I'm not very familiar with permissions.
Here are the steps I’ve taken so far:
- To confirm that it's only an issue with DBeaver, I tested the formatter on a
test.sql
file, and the formatter worked from the terminal command. - Installed DBeaver version 24.1.1.202406231636 via Snap.
- Attempted to use
chmod +x
to give DBeaver execute access to my formatter located at/my/nvm/directory/versions/node/v22.3.0/bin/pg-formatter
.
Despite this, the error persists.
Cannot run program "/my/nvm/directory/versions/node/v22.3.0/bin/pg-formatter": error=13, Permission denied
error=13, Permission denied
error=13, Permission denied
The formatter I'm trying to use is pg-formatter.
Can anyone help me understand why I'm getting this error and how to properly configure a formatter for DBeaver?
ls -l /my/nvm/directory/versions/node/v22.3.0/bin/pg-formatter
in the terminal.lrwxrwxrwx 1 my-user-name my-user-name 50 jul 5 22:09 /my/nvm/directory/.nvm/versions/node/v22.3.0/bin/pg-formatter -> ../lib/node_modules/pg-formatter/dist/bin/index.js
so i think isrwx
that is what i gave it.error=13, Permission denied
on/my/nvm/directory/versions/node/v22.3.0/lib/node_modules/pg-formatter/dist/bin/index.js
the output was-rwxrwxrwx 1 my-user-name my-user-name 3018 jul 5 22:09 /my/nvm/directory/versions/node/v22.3.0/lib/node_modules/pg-formatter/dist/bin/index.js
the only difference was 3018, but i dont know what that means