/usr/share/postgresql/9.6/contrib/ is in postgresql-9.6-postgis-2.3-scripts 2.3.1+dfsg-2.
This file is owned by root:root, with mode 0o755.
..
/usr/share/postgresql/9.6/contrib/postgis-2.3/
/usr/share/postgresql/9.6/contrib/postgis-2.3/legacy.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/legacy_gist.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/legacy_minimal.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/postgis.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/postgis_comments.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/postgis_for_extension.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/postgis_proc_set_search_path.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/postgis_restore.pl
/usr/share/postgresql/9.6/contrib/postgis-2.3/postgis_upgrade.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/postgis_upgrade_for_extension.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/raster_comments.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/rtpostgis.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/rtpostgis_for_extension.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/rtpostgis_legacy.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/rtpostgis_proc_set_search_path.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/rtpostgis_upgrade.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/rtpostgis_upgrade_for_extension.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/sfcgal.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/sfcgal_comments.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/sfcgal_upgrade.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/spatial_ref_sys.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/topology.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/topology_comments.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/topology_upgrade.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/uninstall_legacy.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/uninstall_postgis.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/uninstall_rtpostgis.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/uninstall_sfcgal.sql
/usr/share/postgresql/9.6/contrib/postgis-2.3/uninstall_topology.sql