Permission error in `Quick Start (using Codebase)` section of README.md in `./createdb.sh`
What happened?
When executing that shell file there are many commands which take files from current directory namely updatepg.sql and explorerpg.sql.
Commands are executed as postgres user like sudo -u postgres psql ... -f updatepg.sql. I don't know if it is only me but most probably postgres user will not have access to default /home/user directory and files under that. There is a command given for that chmod -R 775 db/ but probably they missed that permission has no meaning because just parent of db/ wouldn't allow postgres user to access anything. More explanation here.
What did you expect to happen?
So rather shell scripts should consist of commands like psql -U postgres ... -f updatepg.sql this allow files to get accessed by psql and commands is executed as postgres user in database.
How can we reproduce it (as minimally and precisely as possible)?
Simply follow the README.md and make sure to check you already haven't allowed other users to access your home directory.
Anything else we need to know?
No response
OS version
# On Linux:
$ cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
$ uname -a
Linux amit-dell 6.4.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 24 Aug 2023 00:38:14 +0000 x86_64 GNU/Linux
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
Doesn't it sounds like some security issue with psql?
Hi @Amit0617 Thanks for the issue. Will look into it.