pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedpermissions.
2+ messages / 2 participants
[nested] [flat]
* permissions.
@ 2016-01-12 11:46 Frik Brits <fbrits@lantic.net>
2016-01-13 08:11 ` Re: permissions. Shulgin, Oleksandr <oleksandr.shulgin@zalando.de>
0 siblings, 1 reply; 2+ messages in thread
From: Frik Brits @ 2016-01-12 11:46 UTC (permalink / raw)
To: pgsql-bugs
Hello,
What is to be done here, below between the lines is an excerpt from my
bash console if I want to start PostgreSQL.
-----------------------------------------------------------------------------------------------------
frik@linux-cj2v:/etc/alternatives> postgres -D /bigdisk/data/postgres &
[1] 10438
frik@linux-cj2v:/etc/alternatives> 2016-01-12 13:09:29 SAST FATAL: could
not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": Permission
denied
------------------------------------------------------------------------------------------------------
mySQL has the same problems. Perhaps worse.I know u do not do mySQL stuff, but
still.
I can go fix this by changing the permissions of /var/run and
/var/run/postgresql/ direc tories but then one will have to change it every
single time I want to start the databse. O by the way starting it as a service
is even worse because the then it wants to work in it own data directory.
Can this not be fixed, I mean linux is linux whichever flavour one my want to
use?.
Fortunately not all linux programs have these strange permissions hickups.
Regards
Frik Brits
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: permissions.
2016-01-12 11:46 permissions. Frik Brits <fbrits@lantic.net>
@ 2016-01-13 08:11 ` Shulgin, Oleksandr <oleksandr.shulgin@zalando.de>
0 siblings, 0 replies; 2+ messages in thread
From: Shulgin, Oleksandr @ 2016-01-13 08:11 UTC (permalink / raw)
To: Frik Brits <fbrits@lantic.net>; pgsql-general@postgresql.org; +Cc: pgsql-bugs
[not a bug, moving to -general]
On Tue, Jan 12, 2016 at 12:46 PM, Frik Brits <fbrits@lantic.net> wrote:
> Hello,
> What is to be done here, below between the lines is an excerpt from my
> bash console if I want to start PostgreSQL.
>
>
> -----------------------------------------------------------------------------------------------------
> frik@linux-cj2v:/etc/alternatives> postgres -D /bigdisk/data/postgres &
> [1] 10438
> frik@linux-cj2v:/etc/alternatives> 2016-01-12 13:09:29 SAST FATAL:
> could
> not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": Permission
> denied
>
> ------------------------------------------------------------------------------------------------------
>
> mySQL has the same problems. Perhaps worse.I know u do not do mySQL stuff,
> but
> still.
>
> I can go fix this by changing the permissions of /var/run and
> /var/run/postgresql/ direc tories but then one will have to change it every
> single time I want to start the databse. O by the way starting it as a
> service
> is even worse because the then it wants to work in it own data directory.
>
> Can this not be fixed, I mean linux is linux whichever flavour one my want
> to
> use?.
>
> Fortunately not all linux programs have these strange permissions hickups.
>
Typically a postgres installation configured in such a way expects that the
master process is started by the user named postgres. You can achieve that
by using sudo(1) command, e.g: sudo -u postgres COMMAND
In your example:
$ sudo -u postgres postgres -D /bigdisk/data/postgres
Not sure why are you trying to start it in foreground. Please refer to
documentation for pg_ctl(1) and your distribution init system. Something
like the following should have equivalent effect (that is, starting
postgres):
$ sudo pg_ctl -D /bigdisk/data/postgres start
OR
$ sudo service postgresql start
Debian and derivative systems such as Ubuntu provide pg_ctlcluster(1)
command to manage multiple clusters and PostgreSQL versions.
Can you elaborate on the problems you encounter when PostgreSQL is started
as a service?
--
Alex
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-01-13 08:11 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-01-12 11:46 permissions. Frik Brits <fbrits@lantic.net>
2016-01-13 08:11 ` Shulgin, Oleksandr <oleksandr.shulgin@zalando.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox