{"Entry":{"collection":"role","key":"pg_read_server_files","name":"pg_read_server_files","aliases":[],"metadata":{"aliases":[],"category":"Server files and programs","content_hash":"166c5be61f71d590283caf0619819126895da21722bd3b0550507361601b40ca","derived_content_hash":"38c8607a4a367d46a1eb5dfa9699a16c47037ab5fbc8e8a2c5598341bfcf6b80","imported_at":"2026-09-27T17:57:59.058418+08:00","name":"pg_read_server_files","name_zh":"pg_read_server_files","repair_provenance":{"original_source_revision":"","receipt_sha256":"611ebf0b9e2e34716f175f31d7771a6252bce10be51829dbabb94fcea589e729","repair":"wiki-repair-20261023"},"slug":"pg_read_server_files","source_rev":"wiki-repair-20261023:63d8e8d884078ab28c94d047092cd849866f9ecf0bae12eb7cc5903d98b57b69","summary":"pg_read_server_files allows reading files from any location the database can access on the server using COPY and other file-access functions."}},"Definition":{"Collection":"role","Key":"pg_read_server_files","SourceDatabase":"center","Version":"18","SourceTable":"predefined_role","SourceKey":"pg_read_server_files","SourceRevision":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75","Facts":{"description":["pg_read_server_files allows reading files from any location the database can access on the server using COPY and other file-access functions."],"description_zh":"这些角色旨在让管理员能够使受信任但非超级用户的角色能够以数据库运行所用操作系统用户的身份访问文件并在数据库服务器上运行程序。它们在直接访问文件时会绕过所有数据库级权限检查，并且可被用来获得超级用户级别的访问能力。因此，向用户授予这些角色时必须极其谨慎。","description_zh_html":"\u003cp\u003e\n       这些角色旨在让管理员能够使受信任但非超级用户的角色能够以数据库运行所用操作系统用户的身份访问文件并在数据库服务器上运行程序。它们在直接访问文件时会绕过所有数据库级权限检查，并且可被用来获得超级用户级别的访问能力。因此，向用户授予这些角色时必须极其谨慎。\n      \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"literal\"\u003epg_read_server_files\u003c/code\u003e 允许使用 \u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e 和其他文件访问函数，从服务器上数据库可访问的任何位置读取文件。\n      \u003c/p\u003e","facts":[{"label":"Name","value":"pg_read_server_files"},{"label":"Manual terminology","value":"Predefined roles"}],"related":[],"release":{"channel":"stable","label":"18.6","major":"18","ref":"PostgreSQL 18.6 Documentation","revision":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75"},"sections":[{"paragraphs":["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."],"title":"Privileges and scope"}],"sources":[{"label":"PostgreSQL 18.6 Documentation","sha256":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75","url":"/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-READ-SERVER-FILES"},{"label":"PostgreSQL 18 online manual","url":"https://www.postgresql.org/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-READ-SERVER-FILES"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/predefined-roles.html","sha256":"99e1fbd83b1da2cf9da5823238b31d78c953c6118ecc61939808d2bf32f9b56d"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{"release":{"channel":"stable","label":"18.6","major":"18","ref":"PostgreSQL 18.6 Documentation","revision":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75"},"sources":[{"label":"PostgreSQL 18.6 Documentation","sha256":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75","url":"/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-READ-SERVER-FILES"},{"label":"PostgreSQL 18 online manual","url":"https://www.postgresql.org/docs/18/predefined-roles.html#PREDEFINED-ROLE-PG-READ-SERVER-FILES"}]},"MeasuredEvidence":{}},"Text":{"Collection":"role","Key":"pg_read_server_files","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_read_server_files","Summary":"pg_read_server_files allows reading files from any location the database can access on the server using COPY and other file-access functions.","BodyHTML":"\u003cp\u003epg_read_server_files allows reading files from any location the database can access on the server using COPY and other file-access functions.\u003c/p\u003e","SourceRevision":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75","ContentHash":"2b696e41520f99fa24f7fb1e01e0a4e696878c2f4dc7973cb8dec814f81fb3e5","Payload":{"description":["pg_read_server_files allows reading files from any location the database can access on the server using COPY and other file-access functions."],"related":[],"sections":[{"paragraphs":["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."],"title":"Privileges and scope"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
