如何强制文件夹中的所有文件归Google云端硬盘中的文件夹所有者所有? [英] How can I force all files in a folder to be owned by the folder owner in Google Drive?

查看:63
本文介绍了如何强制文件夹中的所有文件归Google云端硬盘中的文件夹所有者所有?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个人将文件贡献到Google云端硬盘中的各个文件夹中.每个文件夹用于一个特定项目,并具有一个与该项目标题匹配的所有者帐户.我希望该父文件夹中的每个文件(及其后代)都归该项目帐户所有.例如,该文件夹称为会议",并由用户"conferences.events@mydomain.com"拥有.上传/创建到会议中的所有文件应归"conferences.events"帐户所有.

I have several people contributing files to various folders in Google Drive. Each folder is for a specific project, and has an owner account named to match that project title. I want every file (and its descendants) in that parent folder to be owned by that project account. Eg the folder is called "Conferences", and is owned by the user "conferences.events@mydomain.com". All files uploaded/created into Conferences should be owned by the "conferences.events" account.

自动执行此操作最简单的方法是什么(我一直在网上寻找脚本),有人可以提供有效的示例吗?谢谢.

What is the easiest way to automate this (I've looked for scripts online), and can someone provide a working example? Thanks.

推荐答案

简短答案

强制"文件夹中的文件由文件夹所有者拥有的唯一方法是其他用户仅对该文件具有查看权限.

Short answer

The only way "to force" files in folder be owned by the folder owner is that the the other users only have view access to it.

如果用户能够将文件添加到文件夹,则无法避免他们添加文件夹所有者用户以外的其他人拥有的文件.

If users are able to add files to a folder there is no way to avoid that they add files that are owned by other then the folder owner user.

代替允许用户直接向文件夹中的文件添加内容,而采用其他方式将文件添加到该文件夹​​中.有几种选择:

Instead of allowing users to directly contribute to files to folders, implement other way to add the files to that folder. There are several alternatives:

  1. 使用Google表单.Google最近向Google Forms添加了一个上传文件.它仅适用于G Suite用户.参考:编辑表单,来自Google文档编辑器帮助的文章

  1. Use Google Forms. Google recently added a upload file to Google Forms. It's only available to G Suite users. Reference: Edit form, article from Google Docs Editors Help

创建一个Google Apps脚本网络应用.Web App可以创建用户选择的文件的副本,甚至可以更改文件所有者.

Create a Google Apps Script Web App. A Web App could create a copy of the a file selected by the user or even it could change the file owner.

  • Reference: Transfer ownership of a file to another user in Google Apps Script Q&A from Stack Overflow

使用Google Drive API创建应用

Create an app using Google Drive API

  • Reference: Transfer Drive files to a new owner, article from the G Suite Administrators Help

这篇关于如何强制文件夹中的所有文件归Google云端硬盘中的文件夹所有者所有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆