{"Entry":{"collection":"role","key":"pg_write_server_files","name":"pg_write_server_files","aliases":[],"metadata":{"aliases":[],"category":"Server files and programs","content_hash":"8a8b425e462095f3a6023a014bb2c06b8e7c460595cc2b6f78035ca19ea15c45","derived_content_hash":"6648f5d827e3cca9ee558cf24a32e2e16f83153364ea0f07e2fa03e037f5597f","imported_at":"2026-09-27T17:57:59.067256+08:00","name":"pg_write_server_files","name_zh":"pg_write_server_files","repair_provenance":{"original_source_revision":"","receipt_sha256":"7a83683fcc64fd6911ca448721319975ce3150bd5b015536ea95d86f9aa0661d","repair":"wiki-repair-20261023"},"slug":"pg_write_server_files","source_rev":"wiki-repair-20261023:d0b3784e520480da11294ecbdefd1531c281995088c1d99a755827746948ff40","summary":"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."}},"Definition":{"Collection":"role","Key":"pg_write_server_files","SourceDatabase":"center","Version":"18","SourceTable":"predefined_role","SourceKey":"pg_write_server_files","SourceRevision":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75","Facts":{"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."],"description_zh":"这些角色旨在让管理员能够使受信任但非超级用户的角色能够以数据库运行所用操作系统用户的身份访问文件并在数据库服务器上运行程序。它们在直接访问文件时会绕过所有数据库级权限检查，并且可被用来获得超级用户级别的访问能力。因此，向用户授予这些角色时必须极其谨慎。","description_zh_html":"\u003cp\u003e\n       这些角色旨在让管理员能够使受信任但非超级用户的角色能够以数据库运行所用操作系统用户的身份访问文件并在数据库服务器上运行程序。它们在直接访问文件时会绕过所有数据库级权限检查，并且可被用来获得超级用户级别的访问能力。因此，向用户授予这些角色时必须极其谨慎。\n      \u003c/p\u003e\u003cp\u003e\n\u003ccode class=\"literal\"\u003epg_write_server_files\u003c/code\u003e 允许使用 \u003ccode class=\"command\"\u003eCOPY\u003c/code\u003e 和其他文件访问函数，向服务器上数据库可访问的任何位置写入文件。\n      \u003c/p\u003e","facts":[{"label":"Name","value":"pg_write_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_write_server_files","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_write_server_files","Summary":"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.","BodyHTML":"\u003cp\u003epg_write_server_files allows writing to files in any location the database can access on the server using COPY and other file-access functions.\u003c/p\u003e","SourceRevision":"b7ebd726e6017f55081b4034b96d6a3289ae7937a26adaf72e58b9a08e009c75","ContentHash":"4eb5ca1478f92123b3ac01af1dacde9257497d18276bdf590e8fd0a8aef64a03","Payload":{"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."],"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}
