Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[BUGS] BUG #5430: initdb fails due to permissions of /usr/share/pgsql

61 views
Skip to first unread message

Jamie Strachan

unread,
Apr 19, 2010, 10:22:50 AM4/19/10
to

The following bug has been logged online:

Bug reference: 5430
Logged by: Jamie Strachan
Email address: frost...@yahoo.com
PostgreSQL version: 8.4.3-2PGDG.el4
Operating system: CentOS 4
Description: initdb fails due to permissions of /usr/share/pgsql
Details:

Hello,

Downloaded the following RPM:
http://yum.pgsqlrpms.org/8.4/redhat/rhel-4-i386/postgresql-server-8.4.3-2PGD
G.el4.i386.rpm

for my CentOS 4 install.

service postgresql initdb fails with no error message.

So, I su'd to postgres, and ran

initdb --pgdata=/var/lib/pgsql/data --auth=ident
which is what service postgresql initdb does.
This command failed, with the error message:

could not open directory "/usr/share/pgsql/timezonesets"


I did a
chown -R postgres:postgres /usr/share/pgsql
and then it worked fine.

Using rpm2cpio {file} | cpio -tv
I see:
drwxr-xr-x 6 root root 0 Mar 17 16:21 ./usr/share/pgsql
which is fine, however there is no specific entry for
/usr/share/timezone.
The post-install script doesn't seem to fix it, either.

--
Sent via pgsql-bugs mailing list (pgsql...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Bruce Momjian

unread,
Apr 20, 2010, 11:29:57 AM4/20/10
to

Would you report this to the RPM maintainers?

---------------------------------------------------------------------------

--
Bruce Momjian <br...@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

Devrim GÜNDÜZ

unread,
Apr 20, 2010, 3:38:05 PM4/20/10
to
Hi,

On Mon, 2010-04-19 at 14:22 +0000, Jamie Strachan wrote:
>
> for my CentOS 4 install.
>
> service postgresql initdb fails with no error message.
>
> So, I su'd to postgres, and ran
>
> initdb --pgdata=/var/lib/pgsql/data --auth=ident
> which is what service postgresql initdb does.
> This command failed, with the error message:
>
> could not open directory "/usr/share/pgsql/timezonesets"

Cannot reproduce it on my 8.4+CentOS 4 box:

-bash-3.00$ initdb --pgdata=/var/lib/pgsql/data --auth=ident
...
Success. You can now start the database server using:
...

timezonesets directory has already *enough* permissions for postgres
user to read it:

drwxr-xr-x 2 root root 4096 2010-03-19 09:45 timezonesets

Are you sure that you did not chmod somewhere between installing package
and initdb'ing?

Regards,
--
Devrim GÜNDÜZ
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
PostgreSQL RPM Repository: http://yum.pgrpms.org
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz

signature.asc

Devrim GÜNDÜZ

unread,
Apr 21, 2010, 3:42:28 AM4/21/10
to
On Tue, 2010-04-20 at 13:39 -0700, Jamie Strachan wrote:
> [root@isotest ~]# ls -ld /usr/share/pgsql/timezonesets/
> drwxr-x--- 2 root root 4096 Apr 20
> 16:27 /usr/share/pgsql/timezonesets/

Still, this should have never ever happened. Lacey, AFAICS there is
nothing that could cause this issue in your spec file.

> # more /etc/redhat-release
> Red Hat Enterprise Linux ES release 4 (Nahant Update 3)

Mine is Update 8, BTW. I wonder whether there is an bug related to rpm
itself in here.

signature.asc

Devrim GÜNDÜZ

unread,
Apr 21, 2010, 9:21:13 AM4/21/10
to
On Wed, 2010-04-21 at 06:19 -0700, Jamie Strachan wrote:
> I don't think there should be any issue with explicitly specifying the
> directory in the RPM with a %dir directive.

Yeah, I will do it in next set -- I'm just thinking whether it is worth
to push another build for now or not ;)

I'll let you know.

Regards,

signature.asc

Lacey Powers

unread,
Apr 21, 2010, 5:37:27 PM4/21/10
to
Devrim GÜNDÜZ wrote:
> On Wed, 2010-04-21 at 06:19 -0700, Jamie Strachan wrote:
>> I don't think there should be any issue with explicitly specifying the
>> directory in the RPM with a %dir directive.
>
> Yeah, I will do it in next set -- I'm just thinking whether it is worth
> to push another build for now or not ;)
>
> I'll let you know.
>
> Regards,
>

Hello Everyone,

Yes, likewise, I cannot reproduce this on CentOS 4.8.

The permissions for the directory, from a clean RPM install, are 755 for
me.

However, the fixes listed and discussed, make good sense to me, so I
will be sure to include that in future rpm releases.

Jamie, Devrim, thank you both for your input. =)

Sincerely,

Lacey

--
Lacey Powers

The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 ext 104
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

0 new messages