Re: Restarting, ownership, and permissions

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Restarting, ownership, and permissions
Дата
Msg-id m3d6ei99x5.fsf@varsoon.wireboard.com
обсуждение исходный текст
Ответ на Restarting, ownership, and permissions  ("Aurangzeb M. Agha" <ama-list@mltp.com>)
Список pgsql-general
"Aurangzeb M. Agha" <ama-list@mltp.com> writes:

> I run my Postgres DB on a virtual linux server where I don't have root.
> I'm 'admin', by default, and have created a 'postgres' user to own the DB
> dir.
>
> My problem is that on occassion, my ISP restarts my server, stranding all
> my processes.  While I have scripts to restart Apache and my Servlet
> engine on reboot, I don't know how to get the Postgres DB up and running
> again.  The main problem is that the dir is owned (postgres.postgres) and
> chmod'd to 700, keeping anyone but the 'postgres' user from starting it
> up.
>
> I tried chownin'g the DB dir to postgres.admin, and chmodding to 770, but
> when I tried to start the DB, I got a fatal error in the log indicating
> that postgres must own the dir, and the permissions must be u=rwx.  What
> can I do?

You have several choices as I see it:

1) Have Postgres run as 'admin' (not ideal, but not horrible)
2) Manually log in as 'postgres' to start the server when necessary
3) Work with your ISP to find a clean solution--perhaps they can
   create a little setuid 'postgres' C program that runs the startup script

I recommend #3, personally.

-Doug

В списке pgsql-general по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Table name lengths...
Следующее
От: Jonathan Bartlett
Дата:
Сообщение: Re: About GPL and proprietary software