↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Documentation / Predefined Roles / Server files and programs

pg_write_server_files

pg_write_server_files

pg_write_server_files allows writing to files in any location the database can access on the server using COPY and other file-access functions.

Reading PostgreSQL 18.6.

Description

pg_write_server_files allows writing to files in any location the database can access on the server using COPY and other file-access functions.

Name
pg_write_server_files
Manual terminology
Predefined roles

Privileges and scope

These roles are intended to allow administrators to have trusted, but non-superuser, roles which are able to access files and run programs on the database server as the user the database runs as. They bypass all database-level permission checks when accessing files directly and they could be used to gain superuser-level access. Therefore, great care should be taken when granting these roles to users.

Documentation and source

Source build
Version
18.6
Build
PostgreSQL 18.6 Documentation
Source fingerprint
b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75

Related entries

Back to Predefined Roles · Recorded in PostgreSQL 11 through 20; the first sample is not necessarily its introduction.