Opened 17 years ago
Last modified 3 years ago
#14083 assigned enhancement
compatibility improvement for postgresql82-server
Reported by: | apinstein@… | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | jyrkiwahlstedt, Jonathan.Beall@…, cooljeanius (Eric Gallager) | |
Port: | postgresql82-server |
Description (last modified by jmpalacios (Juan Manuel Palacios))
For starting/stopping the server, you should do:
instead of
su postgres -c "${PGCTL} -D ${POSTGRESQL82DATA:=/opt/local/var/db/postgresql82/defaultdb} start -l /opt/local/var/log/postgresql82/postgres.log"
do
sudo -u $PGUSER sh -c "${DAEMON} -D '${PGDATA}' | ${LOGUTIL} '${PGLOG}' ${ROTATESEC} &"
The latter is the postgresql way now, and doesn't require the "postgres" user to have a login shell, which is more secure.
Also, when creating the "postgresql" user, set the shell to /usr/bin/false
.
Change History (8)
comment:1 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Description: | modified (diff) |
---|---|
Milestone: | → Port Enhancements |
Type: | defect → enhancement |
comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | jwa@… added |
---|---|
Owner: | changed from macports-tickets@… to mww@… |
comment:3 Changed 17 years ago by apinstein@…
Thanks! Yeah, for what it's worth, we discovered this when installing macports postgres on a box where a different postgres had already been installed from source and installed according to the postgres instructions. So the system already had a "postgres" user with no shell, and the MacPorts postgres wouldn't run. The su vs sudo thing didn't cause any error messages to be shown, either, so it took a few hours to realize what was going on. Hopefully this will help save others some time and be more secure.
comment:4 Changed 17 years ago by apinstein@…
OH also one more thing, will this info make it into the other postgresql8x ports? Or do I need to report the bug there as well...
comment:5 Changed 16 years ago by (none)
Milestone: | Port Enhancements |
---|
Milestone Port Enhancements deleted
comment:6 Changed 15 years ago by blb@…
Cc: | Jonathan.Beall@… added |
---|---|
Port: | postgresql82-server added |
Cc reporter of dup #19972.
comment:7 Changed 8 years ago by mf2k (Frank Schima)
Owner: | mww@… deleted |
---|---|
Status: | new → assigned |
Version: | 1.6.0 |
See #53012.
comment:8 Changed 3 years ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
Sounds like a good idea. Assigning to / Cc'ing maintainer.