Sub topic 8
Ownership and transferring it
This chapter assumes you already know the three roles (Viewer, Commenter, Editor), how to share with named people, and the basics of general access. Here you will learn what the Owner can do that an Editor cannot, how ownership moves from one person to another, and what goes wrong when it does not move.
What ownership means
Every file in Google Drive has exactly one owner. For a spreadsheet in My Drive, the owner is usually the person who created it. Owner is not a fourth role in the Share dialog's role list. It is a status attached to the file, and it carries more power than Editor.
The owner of a spreadsheet can do everything an Editor can, plus the following:
- Delete the file permanently, or empty it from the trash.
- Transfer ownership to someone else.
- Change who can see the file even when the editors-can-change-permissions option is turned off.
- Keep the file counted against their own Drive storage quota.
An Editor cannot do any of these. An Editor can usually change sharing, but only while the owner allows it. The owner can turn that off under the sharing settings covered in the earlier chapter on controlling what editors and viewers can do.
Ownership also decides whose storage and whose account rules apply. A sheet owned by a personal Gmail account counts against that account's quota. A sheet owned by a work account is governed by that organization's admin policies.
Why ownership matters in practice
Ownership usually only becomes a problem when it is missing. These are the common situations:
- A colleague leaves. When an organization deletes a departing user's account, files they own can be deleted with it. Other people may lose access to a sheet they depend on.
- A role changes. A project moves from one person to another, and the new lead cannot delete the file, recover it from the trash, or manage it fully.
- Storage runs out. A large sheet with many images or imported data keeps using the owner's quota, even when many other people work in it.
- The owner has to be asked. If the owner turns off the editors-can-change-permissions setting, no one else can adjust sharing. People must find the owner and ask.
The practical rule is that the person who is responsible for the sheet over the long term should own it. If that is a team rather than a person, consider a shared drive, which is covered in a later chapter.
Transferring ownership step by step
You can transfer ownership only if you are the current owner. The sheet must also be one you own in My Drive.
- Open the spreadsheet and select Share.
- Make sure the new owner is in the list of people. If they are not, add them first as an Editor.
- Next to the person's name, open the role drop-down.
- Choose Transfer ownership.
- Confirm in the dialog that appears.
What happens next depends on the kind of account involved.
| Situation | What happens |
|---|---|
| Both accounts are in the same Google Workspace organization | The transfer is usually immediate. |
| Between two personal Google accounts | The new owner receives a pending request and must accept it. |
| Between a personal account and a Workspace account, or between different organizations | It may be blocked or require acceptance, depending on admin policy. |
After the transfer, you do not lose access entirely. The former owner becomes an Editor on the file. You can then be downgraded or removed by the new owner.
What moves and what does not
A transfer changes the owner and the storage that the file counts against. It does not change the content, the version history, or most of the sheet's settings. However, a few items deserve a check afterward.
- Existing sharing. The people who already had access normally keep it. Open Share after the transfer and confirm that the list is what you expect.
- Protected ranges. Protections have their own editor lists. If the old owner was listed as an allowed editor, they stay on that list even after losing ownership. Review them so the new owner is in control.
- Apps Script projects. A script bound to the spreadsheet goes with the file, but its triggers belong to the person who created them. Triggers run as that person. If the old owner's account is later removed, those triggers stop. The new owner should open the script and recreate any installable triggers.
- Linked content. Charts or imports that point to other files rely on the access of the person who set them up. Formulas such as
IMPORTRANGEask the viewer for permission, so check that they still work for the new owner. - Published links. If the sheet was published to the web, that publication stays on until someone stops it. See the later chapter on publishing.
- Form links. If a Google Form feeds responses into the sheet, ownership of the form is separate from ownership of the sheet. Transfer the form too.
Checking who owns a file
You can confirm the owner in several ways.
- In the Share dialog, the owner is labeled next to their name.
- In Google Drive, open the file's Details panel (the information icon). The Owner field is shown under the file's properties.
- In Drive, the Owner column in list view shows the owner of every file. You can also filter by owner using the search options.
- In Apps Script, you can read it programmatically, as shown below.
function showOwner() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const file = DriveApp.getFileById(ss.getId());
const owner = file.getOwner();
Logger.log('Owner: ' + (owner ? owner.getEmail() : 'not available'));
}For files in a shared drive, getOwner() may return null, because those files belong to the drive and not to a person. The script above handles that case.
Transferring ownership with Apps Script
A script can also transfer ownership. It uses setOwner() on the Drive file. The person running the script must be the current owner, and the same account rules apply as in the Share dialog.
function transferOwnership() {
const newOwner = '[email protected]';
const ss = SpreadsheetApp.getActiveSpreadsheet();
const file = DriveApp.getFileById(ss.getId());
file.setOwner(newOwner);
}This is useful when you need to move many files at once. Note that setOwner() can throw an error if the transfer is blocked by an organization policy, so wrap it in a try/catch block when you loop over many files and log the failures.
Common problems
| Symptom | Likely cause | What to do |
|---|---|---|
| There is no **Transfer ownership** option | You are not the owner, or the person is not yet an Editor | Ask the owner, or add the person as an Editor first |
| The option is there but the transfer fails | An organization policy blocks transfers to that account | Ask your Workspace admin, or make a copy under the new account |
| The new owner never became owner | The recipient has not accepted the pending request | Ask them to check their email and accept |
| A departed colleague's files disappeared | The account was deleted before files were transferred | Admins can often restore a recently deleted account's files, so ask them quickly |
| Automated emails or triggers stopped after the transfer | Triggers still belonged to the old user | The new owner recreates them |
Making a copy instead
Sometimes a transfer is blocked or you do not want to hand over the original history. A second option is to make a copy. The person who makes the copy becomes the owner of the new file.
- Open the spreadsheet and choose File, then Make a copy.
- Choose the folder and decide whether to copy comments and sharing settings.
- Share the new file with the people who need it.
A copy has a new file ID and a new link. The version history of the original does not come with it, and people who used the old link must be told about the new one. For these reasons, a transfer is better when you want continuity, and a copy is better when you want a clean start.
Planning for ownership
A short checklist helps you avoid trouble later:
- Pick one person to own each important sheet, and write the name in a cell or in the file description.
- Before someone leaves a team, list the files they own and transfer them. In Drive, search for files you own and sort by name or date.
- Prefer a shared drive for team-owned data so a person's departure does not affect the file.
- After any transfer, review the Share list, protected ranges and script triggers.
Exercise
You own a budget spreadsheet in My Drive and are moving to a different team. Your colleague Dana is a Viewer on the sheet. Describe the steps to make her the owner, and name two things you should check afterward.
Show answer
First change Dana's role to Editor, or add her as an Editor, because ownership can only be transferred to someone who already has Editor access. Then open the role drop-down next to her name, choose Transfer ownership and confirm. If the accounts are in different organizations or personal accounts, Dana may need to accept the request. Afterward, check that the Share list still matches what you expect, and review any protected ranges and Apps Script triggers. Protected ranges may still list you as an allowed editor, and triggers you created run as you and must be recreated by Dana.
Exercise
A script contains the line file.getOwner().getEmail(), and it fails with an error when run against a spreadsheet stored in a shared drive. Why does it fail, and how would you fix it?
Show answer
Files in a shared drive belong to the drive and not to a person, so getOwner() returns null, and calling getEmail() on null causes an error. Check the result before using it, for example: const owner = file.getOwner(); and then use owner ? owner.getEmail() : 'not available'.