set_drive_file_permissions
Set link-sharing mode and file-level permissions for Drive files, including editor sharing rights and viewer copy prevention.
Instructions
Toggle link-sharing and common file-level sharing controls.
Side effects: mutates sharing policy. Use this for high-level toggles ("anyone with the link", editor share rights, viewer copy-prevention). For per-user/group permission changes use manage_drive_access. At least one of the three flags must be set. Requires the drive.file OAuth scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| file_id | Yes | Drive file or folder ID. | |
| link_sharing | No | "off" removes anyone-with-link access; "reader", "commenter", or "writer" sets the link role. Omit to leave link sharing unchanged. | |
| writers_can_share | No | True lets editors re-share; False restricts sharing to owner only. | |
| copy_requires_writer_permission | No | True blocks viewers/commenters from copy/print/download; False allows. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |