Bug 74003

Summary: [postgresql-contrib] Does not work when installed with an umask of 077 and messes filesystem
Product: [Retired] Red Hat Linux Reporter: Enrico Scholz <rh-bugzilla>
Component: postgresqlAssignee: Tom Lane <tgl>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: hhorak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://www.tu-chemnitz.de/~ensc/dircheck/null/packages.html#postgresql-contrib-7.2.1-16
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-17 16:45:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Enrico Scholz 2002-09-13 17:33:42 UTC
Description of Problem:

Because this package contains unowned directories, they will be created
with the current umask. When having restrictive administrator settings
(umask 077) ordinary user will not have access to them and can not use
the package.

Another problem occurs when removing packages. Then orphaned directories
are remaining.

| $ rpm -qf /usr/lib/pgsql /usr/lib/pgsql/contrib
| file /usr/lib/pgsql is not owned by any package
| postgresql-contrib-7.2.1-16


Version-Release number of selected component (if applicable):

postgresql-contrib-7.2.1-16
postgresql-jdbc-7.2.1-16
postgresql-odbc-7.2.1-16
postgresql-tcl-7.2.1-16


How Reproducible:

100%


Steps to Reproduce:
1. umask 077
2. make sure that postgresql-contrib is uninstalled completely
   (rm -rf /usr/lib/pgsql)
3. rpm -U postgresql-contrib-7.2.1-16.i386.rpm
4. ls -l /usr/lib/pgsql
5. try to use the programs/scripts/libraries/data of the package as
   non-root user
6. rpm -e postgresql-contrib-7.2.1-16

Actual Results:

* at 4:
  | drwx------    2 root     root         4096 Sep 13 18:44 /usr/lib/pgsql
* files can not be found/read at 5 and
* /usr/lib/pgsql still exists after 6.

Comment 1 Andrew Overholt 2003-03-04 17:34:55 UTC
Assigning to me.

Comment 2 Andrew Overholt 2003-03-28 19:31:47 UTC
This is because /usr/lib/pgsql is not explicitly listed in the %files section
for the contrib package.  Ben will fix this.

Comment 3 Tom Lane 2004-08-24 18:46:18 UTC
I think this bug is probably out-of-date, if not wrong altogether. 
Looking at the current postgresql.spec file, %{_libdir}/pgsql is shown
as a directory belonging to the postgresql-server package, which is
probably reasonable.  We can't list it as belonging to the contrib
package, I don't think, since the server and pl packages also install
libraries there.

Is there anything we still ought to change?

Comment 4 Enrico Scholz 2004-08-24 19:01:01 UTC
Bug is still up-to-date. The postgresl-contrib package can be installed
without the -server package and /usr/lib/pgsql would be unowned then
(with the told consequences).

I do not see a reason why this directory can not be listed in -contrib's
%file list also. A better solution would be probably, when it is owned
by the base 'postgresql' package. This would solve the problem for
some other postgresql-* subpackages (-jdbc, -odbc, -tcl) also.


Comment 5 Tom Lane 2004-12-17 16:45:51 UTC
I've reassigned /usr/lib/pgsql to the base package, as per your last
suggestion.