Shell-Init: Error Retrieving Current Directory: Getcwd -- the Usual Fixes Do Not Wor

error retrieving current directory running psql commands under sudo

Your script is being run from somewhere (such as /root -- or possibly a previously-deleted temporary directory) where the postgres user does not have access to the current working directory.

These messages are effectively harmless (unless you're invoking scripts that depend on $PWD or similar variables or commands), but if you want to avoid them, change directories to somewhere certain to exist and which the postgres user has access to. For instance, put the line:

cd /

...at the top of your script, just under the shebang.

Error in Jenkins Mac Catalina - cannot access parent directories: Operation not permitted

Catalina has a more complex set of permissions than previous versions of macOS X, and therefore requires you to do some additional work if you want the process to access files in certain folders, including the Desktop folder.

For normal applications, you can grant access using the System Preferences and the Privacy tab. For background applications, it's a bit more difficult, and especially with the java interpreter, but you should be able to add the java interpreter to the list of excluded Apps.

However, you may want to consider not using a folder on your Desktop to avoid this.



Related Topics



Leave a reply



Submit