| Summary: | dev-db/postgresql-server - incorrect permissions on /var/run/postgresql/ | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Joseph <syscon780> |
| Component: | New packages | Assignee: | PgSQL Bugs <pgsql-bugs> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | CC: | dark, mschiff |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Joseph
2011-12-20 00:18:14 UTC
You must add the user Apache is running under to the 'postgres' group. This is documented in the quick start guide and in the post-install message. Yes this information was in quick install guide but NOT in post install message.
Here are the messages after I emerge potgresql-server;
If you have users and/or services that you would like to utilize the socket,
you must add them to the 'postgres' system group:
usermod -a -G postgres <user>
Before initializing the database, you may want to edit PG_INITDB_OPTS so that
it contains your preferred locale in:
/etc/conf.d/postgresql-9.1
Then, execute the following command to setup the initial database
environment:
emerge --config =dev-db/postgresql-server-9.1.1
Next, is the message after user run: emerge --config ...
Configuring pkg...
* You can modify the paths and options passed to initdb by editing:
* /etc/conf.d/postgresql-9.1
*
* Information on options that can be passed to initdb are found at:
* http://www.postgresql.org/docs/9.1/static/creating-cluster.html
* http://www.postgresql.org/docs/9.1/static/app-initdb.html
*
* PG_INITDB_OPTS is currently set to:
* (none)
*
* Configuration files will be installed to:
* /etc/postgresql-9.1/
*
* The database cluster will be created in:
* /var/lib/postgresql/9.1/data
*
* Are you ready to continue? (y/n)
y
* Checking system parameters...
* Checking whether your system supports at least 128 connections...
* Passed.
* Creating the data directory ...
* Initializing the database ...
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".
fixing permissions on existing directory /var/lib/postgresql/9.1/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 24MB
creating configuration files ... ok
creating template1 database in /var/lib/postgresql/9.1/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.
Success. You can now start the database server using:
/usr/lib64/postgresql-9.1/bin/postgres -D /var/lib/postgresql/9.1/data
or
/usr/lib64/postgresql-9.1/bin/pg_ctl -D /var/lib/postgresql/9.1/data -l logfile start
* The autovacuum function, which was in contrib, has been moved to the main
* PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled
* by default. You can disable it in the cluster's:
* /etc/postgresql-9.1/postgresql.conf
*
* The PostgreSQL server, by default, will log events to:
* /var/lib/postgresql/9.1/data/postmaster.log
*
* You should use the '/etc/init.d/postgresql-9.1' script to run PostgreSQL
* instead of 'pg_ctl'.
Can you point me to the information where user is instructing to add group "postgres" to apache?
(In reply to comment #2) > Yes this information was in quick install guide but NOT in post install > message. ... > Can you point me to the information where user is instructing to add group > "postgres" to apache? Yes, I can: > Here are the messages after I emerge potgresql-server; > > If you have users and/or services that you would like to utilize the socket, > you must add them to the 'postgres' system group: > usermod -a -G postgres <user> You quoted it. 'apache' isn't the only user that may need to be added to the 'postgres' group. I don't consider apache as a user (it doesn't have a home directory). For me user on the system is anybody whom I add after installing the OS. So maybe this is the part I'm confused about or the post installation instructions are not clear. In addition, in the past there was no need to add "apache" to postgre group. In the new installation the permission of the directory had changed to: drwxrwx--- 2 postgres postgres 4096 Dec 19 13:21 /var/run/postgresql/ but the post installation instruction did not changed. I waisted almost 2-days trying to solve this problem, so I'm not happy about it. Another (-) for Gentoo. *** Bug 422831 has been marked as a duplicate of this bug. *** *** Bug 449400 has been marked as a duplicate of this bug. *** |