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