How to stop a PostgreSQL database with pg_ctl?
I had to change owner of those files to user postgres and then shut it down via that user:

$ sudo chown -R postgres .
$ sudo su
# su postgres
$ pg_ctl stop -D /Library/PostgreSQL/9.6/data
waiting for server to shut down.... done
server stopped