On Tue, 30 Mar 2021 at 18:39, Tom Lane <t...@sss.pgh.pa.us> wrote: > Isaac Morland <isaac.morl...@gmail.com> writes: > > I've built Postgres inside a Ubuntu Vagrant VM. When I try to "make > check", > > I get a complaint about the permissions on the data directory: > [....]
> Further up in initdb.log, there was probably some useful information > about whether it found an existing directory there or not. > Sorry for the noise. Turns out that directory creation in /vagrant does not respect umask: vagrant@ubuntu-focal:/vagrant$ umask 0027 vagrant@ubuntu-focal:/vagrant$ mkdir test-umask vagrant@ubuntu-focal:/vagrant$ ls -ld test-umask/ drwxr-xr-x 1 vagrant vagrant 64 Mar 31 01:12 test-umask/ vagrant@ubuntu-focal:/vagrant$ I knew that file ownership changes are not processed in /vagrant; and because I remembered that I checked whether permission mode changes were accepted, but didn't think to check whether umask worked. When I tried again (git clone, build, make check) in another directory it worked fine. I was then able to get the tests to run (and pass) in /vagrant by changing the --temp-instance setting in src/Makefile.global (and looks like I should be able to edit src/Makefile.global.in and re-run configure) to a location outside of /vagrant. Is there a way to tell configure to override the setting? I ask mostly because src/Makefile.global.in says users shouldn't need to edit it. Otherwise my fix will most likely be to maintain a one-line update to this file in my checkout.