-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Set PGDATA permissions to 700 #110
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
Set PGDATA permissions to 700 #110
Conversation
Any feedback on this PR? |
@@ -8,6 +8,7 @@ set_listen_addresses() { | |||
|
|||
if [ "$1" = 'postgres' ]; then | |||
mkdir -p "$PGDATA" | |||
chmod -R 700 "$PGDATA" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does everything in the directory need to be 700
as well or should we drop the -R
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed
Thanks for the reminder! |
LGTM, ping @tianon |
LGTM |
Great! Now to get this actually pushed to hub.docker.com, I'll need to update https://github.com/docker-library/official-images/blob/master/library/postgres, correct? Should I set them all to 4774c03af4eabffe5646a979f102ece292111b96 or is there any reason the tags use different git commits? |
That file's contents are generated via the "generate-stackbrew-library.sh"
script from this repo. 👍
|
Awesome, thanks for the direction! Created docker-library/official-images#1319. |
- `docker`: alpine:3.3 (docker-library/docker#7) - `drupal`: 8.0.2 - `java`: explicit `JAVA_HOME` (docker-library/openjdk#61) - `php`: 5.5.31, 5.6.17, 7.0.2; fix edge case in `docker-php-ext-enable` (docker-library/php#172) - `postgres`: 9.5.0; set `PGDATA` perms to `0700` (docker-library/postgres#110) - `python`: add `alpine` variant for 3.5 (docker-library/python#74) - `rabbitmq`: fix SSL bugs (docker-library/rabbitmq#55, docker-library/rabbitmq#56) - `wordpress`: 4.4.1
- `docker`: alpine:3.3 (docker-library/docker#7) - `drupal`: 8.0.2 - `java`: explicit `JAVA_HOME` (docker-library/openjdk#61) - `php`: 5.5.31, 5.6.17, 7.0.2; fix edge case in `docker-php-ext-enable` (docker-library/php#172) - `postgres`: 9.5.0; set `PGDATA` perms to `0700` (docker-library/postgres#110) - `python`: add `alpine` variant for 3.5 (docker-library/python#74) - `rabbitmq`: fix SSL bugs (docker-library/rabbitmq#55, docker-library/rabbitmq#56) - `wordpress`: 4.4.1
When mounting a volume to PGDATA, it may not have permissions set to 700 which causes postgres to fail with:
To fix this, we can explicitly set it to 700 like we do with the owner.