Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission error in Quick Start (using Codebase) section of README.md in ./createdb.sh #446

Open
Amit0617 opened this issue Sep 7, 2023 · 2 comments

Comments

@Amit0617
Copy link

Amit0617 commented Sep 7, 2023

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
@Amit0617
Copy link
Author

Amit0617 commented Sep 7, 2023

Doesn't it sounds like some security issue with psql?

@ArchanaArige
Copy link
Contributor

Hi @Amit0617
Thanks for the issue. Will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants