Reputation: 2853
Getting error message "Action not allowed (line 3, file "Code")"
function myFunction() {
var file = DriveApp.getFileById("0Bz99xGttsifZR2ItTU5pdXXXXX");
file.setOwner("[email protected]");
}
I'm the owner of the file, so I don't know why it's not allowed.
Upvotes: 0
Views: 2272
Reputation: 3778
You can transfer to anyone, but only Google Drive extensions, ie. the files that doesn't take space in Drive.
Upvotes: 2
Reputation: 3728
Transfer ownership is only possible within a domain. If it were allowed you could fill up the drive of someone in another domain with garbage, resulting in a small Denial of Service attack on that user.
Upvotes: 2