Problems with using custom directory for PostgreSQL - permission denied during installation

Trying a fresh install on Amazon Linux, using version 8.0.4 (Community Edition). Among my custom parameters are the git_data_dir, which is set to /gitroot, and the postgresql data dir, which is set to /gitroot/databases. The relevant lines are:

postgresql['data_dir'] = '/gitroot/databases'
# postgresql['shared_buffers'] = "256MB" # recommend value is 1/4 of total RAM, up to 14GB.

## Advanced settings
# postgresql['ha'] = false
postgresql['dir'] = '/var/opt/gitlab/postgresql'

and

git_data_dir '/gitroot'

Upon an initial run of gitlab-ctl reconfigure, the process fails in a similar fashion to issue #447 (closed), not managing to setup PostgreSQL with the relevant part of the log being:

STDERR: initdb: could not access directory "/gitroot/databases": Permission denied

Upon examining the gitlab-shell.rb recipe, I find that it is setting the permissions of the git_data_dir to 0700. Upon changing that to 0755 (as I saw in the aforementioned #477 (closed)), the reconfiguration worked properly. I'm not sure if this is the correct way to solve the issue, however.