[SFtrack] Commented: (XECS-1207) Backup fails on SuSE due to permissions
[
http://track.sipfoundry.org/browse/XECS-1207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30251
]
Carolyn Beeton commented on XECS-1207:
--------------------------------------
The original comments are not quite correct; the pid file is owned by the
POSTGRESQL_USER and can only be listed by that user (or root). The backup
script is not run by POSTGRESQL_USER.
After a bit of research, it seems that the best way to check that postgresql is
running is via "ps aux | grep postmaster | grep -v grep". I added this test to
the current test. I have verified that this works on SuSE and detects when
postgresql has been stopped. After verifying it on another supported platform
I will attach a patch.
> Backup fails on SuSE due to permissions
> ---------------------------------------
>
> Key: XECS-1207
> URL: http://track.sipfoundry.org/browse/XECS-1207
> Project: sipXecs
> Issue Type: Bug
> Components: portability
> Environment: openSUSE 10.2 (X86-64) or SUSE Linux Enterprise Server
> 10 (x86_64)
> Reporter: Carolyn Beeton
> Assignee: Carolyn Beeton
> Fix For: 4.0
>
>
> On SuSE systems backup fails with an invisible message "PostgreSQL does not
> appear to be running. You must start it in order to backup".
> The problem is due to the following check in sipx-archive-common:
> if [ ! -f /var/run/postmaster*.pid -a \
> ! -f /var/lib/postgresql/data/postmaster*.pid -a \
> ! -f /var/lib/pgsql/data/postmaster*.pid -a \
> ! -f ~postgres/data/postmaster*.pid ]
> On SuSE, /var/run/postmaster*.pid does not exist.
> /var/lib/pgsql/data/postmaster.pid exists but has permission 600 (no read
> permission for non-root).
> Can the backup task be run as root? Also, would "pidof postmaster" be a
> better (more portable) way to see if postgres is running? (Note that pidof
> also requires root on some platforms). Or "ps -edaf|grep postmaster"...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://track.sipfoundry.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira