pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: a3nm.postgresql@a3nm.net
Subject: BUG #15596: Folders created with wrong permissions when installing an extension with a non-default umask
Date: Thu, 17 Jan 2019 01:48:30 +0000
Message-ID: <15596-a7991ddfd29b90d0@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15596
Logged by:          Antoine Amarilli
Email address:      a3nm.postgresql@a3nm.net
PostgreSQL version: 11.1
Operating system:   Debian testing
Description:        

Hi,

I was trying to install a PostgreSQL extension (namely,
https://github.com/PierreSenellart/provsql). This extension uses the macros
in the file /usr/lib/postgresql/11/lib/pgxs/src/makefiles/pgxs.mk to install
itself, so running "make install" does the following:

/bin/mkdir -p '/usr/lib/postgresql/11/lib'
/bin/mkdir -p '/usr/share/postgresql/11/extension'
/bin/mkdir -p '/usr/share/postgresql/11/extension'
/bin/mkdir -p '/usr/share/doc/postgresql-doc-11/extension'
/usr/bin/install -c -m 755  provsql.so
'/usr/lib/postgresql/11/lib/provsql.so'
/usr/bin/install -c -m 644 .//provsql.control
'/usr/share/postgresql/11/extension/'
/usr/bin/install -c -m 644 .//sql/provsql--1.0.0-dev.sql 
'/usr/share/postgresql/11/extension/'
/usr/bin/install -c -m 644 .//doc/provsql.md
'/usr/share/doc/postgresql-doc-11/extension/'
/bin/mkdir -p '/usr/lib/postgresql/11/lib/bitcode/provsql'
/bin/mkdir -p '/usr/lib/postgresql/11/lib/bitcode'/provsql/src/
...

However, the umask of my user is 077, so these "mkdir -p" invocations are
creating folders that can only be read by root, which is not the intended
behavior.

Would it be possible to fix this by redefining MKDIR_P="mkdir -m 0755 -p" in
pgxs.mk so that the mkdir invocations create the folders with the right
permissions, in line with the "install" invocations? Thanks!



view thread (3+ messages)  latest in thread

Message-ID: <15596-a7991ddfd29b90d0@postgresql.org>
Permalink:  ../15596-a7991ddfd29b90d0@postgresql.org/
Also on:    postgresql.org/message-id/15596-a7991ddfd29b90d0@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, a3nm.postgresql@a3nm.net
  Subject: Re: BUG #15596: Folders created with wrong permissions when installing an extension with a non-default umask
  In-Reply-To: <15596-a7991ddfd29b90d0@postgresql.org>
  References: <15596-a7991ddfd29b90d0@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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