pg_bulkload
pg_bulkload copied to clipboard
Tests Fail Due to File Permission Issues
Trying too run the tests (from master) when building on a CentOS 7 docker image using the PostgreSQL community RPMs, I get an error because permission is denied to access bin/results/data1.log and other files. I've worked around it by doing this just before running the tests:
mkdir bin/results
chown -R postges:postgres bin/results
But it seems…unfortunate. Maybe the tests could write the files the server needs to access to a temporary directory or something?
Specifically, from bin/regression.diffs, the error is:
+ERROR: query failed: ERROR: could not open "/work/pg-extras/rpm-builder/pg_bulkload-master/bin/data/data1.bin" Permission denied
Dear @theory In my environment, not permission error printing when running installcheck (sorry, my enviroment is not docker environment, and I do not know about the docker environment...). As you may know, installcheck is needed permissions on the all subfolders of pg_bulkload for the user or group running installcheck. (If need to compare between result files and expected files)
Of course, as you may know, can you please make sure that the users and groups running installcheck have permissions on the subfolders of pg_bulkload? (I do not know about the docker environment, but I wonder if the permission problem is related to the docker...Sorry.)
The issue is that the server needs access to these files, not just the tests. The user running the tests is not the same as the user running the server.
Just ran into this issue again updating to V3.1.16. :-( Not sure how to address it.
What you need to do is copy the files to /tmp or something, then delete them when the test finishes.
Hey @theory,
I solved this problem by giving permission to each directory in the hierarchy.
If your file is in the the directory, say /home/x/y then give permission to /home/x/ and then to /home/x/y/.
This worked for me.
It would be nice not to have to.