Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We recently moved from Dropbox to Google Drive for our whole company and I used one user account to move everything into Google Drive. Now most/all of the file/folders are owned by one account. The folders are broken out by department and I'd like to set the owner of all of the files inside of that folder to the department head. Is there a way to do that without going into each folder? I'd like to solve this in the webapp, but if not, how can I do this with the API?

share|improve this question
up vote 8 down vote accepted

I created a command-line tool to handle this.

After following the setup instructions on the GitHub project, you can run the tool with a specified path prefix and the email address of the new owner:

python transfer.py PATH-PREFIX NEW-OWNER-EMAIL

After getting authorization from OAuth, it will recursively walk the Google Drive account it got authorization to, match against the path prefix (ignoring non-matches), and then transfer ownership to the new email. If the new email address indicates a user who isn't even shared on the item yet, it will handle that as well. The current owner will not lose access, but the new or old owner can revoke it.

share|improve this answer
I've tried out your script but the structure of the folder hierarchy is lost. All the files transferred appear in the new owners drive at the top level. Do you know how to perform the transfer so sub folders, and their files, remain in the folders? – Tony May 13 '15 at 14:28
You may want to share the content with the intended person from the GUI first and then use the utility to promote them to owners. – David Timothy Strauss Jun 2 '15 at 21:50
Thanks! I had to fix a small Unicode bug in your script (check the pull requests on github), but then it worked fine. Only downside: It can only change ownership for Google files (docs, stylesheets, etc.), not for uploaded files like PDFs, because Google simply doesn't allow that, neither through the API nor the web interface. :-( – Jona Christopher Sahnwaldt Sep 13 '15 at 16:26
Could you please explain what is the PATH-PREFIX ? I am not sure if this process is correct: run the python command once then hit enter, get the link, paste it to browser, get the token, re-run the command put the token. After this process I get the "Gathing file listings for prefix []..." with all the root directories I have in my Google drive, put not any change to ownership. – thanos.a Nov 13 '15 at 13:28
@JonaChristopherSahnwaldt Can you clarify? We used this script extensively with normal files in Google Drive. – David Timothy Strauss Jan 20 at 23:51

You can check several folders, then press right mouse button, choose 'Share', and edit access rights.

Does it work for you?

share|improve this answer
Not recursive, but it helps. – Ryan Shillington Mar 7 '14 at 19:35
According to Google's help, using the "share" settings at the folder level will only add the new recipient as an "editor" for the existing files in that folder. (From a programming point of view, the files are the children items of the folder.) To actually change the ownership of files, one much click the checkbox on each file and use the "share" option. – rwong Jul 10 '15 at 22:49
This cannot set me as the new owner where I can only edit. – thanos.a Nov 13 '15 at 13:18
@9000 This was I can only give the ownership to other users, not get it if I don't have it. In my case I have a folder that contains files. Some of them I own, some other owned by another user. In the end I want to own all files. – thanos.a Mar 10 at 8:01
@thanos.a: Security does not work this way. To own a file that somebody else owns, you have to have that somebody give you the access. Imagine someone opening your folder and somehow getting ownership of your files without your consent. – 9000 Mar 10 at 15:34

The best way I have found to do this is to head on over to the "All Items" view, keep on scrolling down until no more files load, and then hit the tick box on top which selects all files and folders in the current view. Once all items are selected, click more, and then share and share again. In the share box change to the appropriate sharing levels and click done.

The only caveat here is you change the permissions for ALL of your files and folders.

share|improve this answer
Where is the "All items" option ? – thanos.a Nov 13 '15 at 13:19

For Google Apps users: the administrator can sign in to https://admin.google.com/ and navigate to Apps > Google Apps > Drive > Transfer Ownership. This operation keeps the files accessible to both users but recursively changes ownership of every file/folder from UserA to UserB.

Google - Transfer ownership of Drive documents

enter image description here

share|improve this answer
That would transfer ALL files to another user. I need something that will take a subset of files and change the ownership. – Dan Mandle Nov 8 '15 at 14:17
This is used when the other account is about to be removed. – thanos.a Nov 13 '15 at 13:32
Sorry, wasn't explicit enough. The point is that one could temporarily transfer all to themselves then promptly set desired permissions on each file/folder. – musophob Jan 14 at 10:58

Move the files. You make the folder sharable to the new owner and then have them move everything in it into a new folder. That makes it all theirs and the original owner loses access. They can chose to share it back or not.

share|improve this answer
-1: Moving the files don't change file ownership. – Rubén Oct 13 '15 at 19:19
This would also make a mess of the files in all but the most simplistic situations. Also, it may not even be possible to move the files depending on permissions and once owned, this wouldn't be an issue. Further still, I do not believe permissions will be inherited from a "folder", just by "moving" a file/folder into it. – rainabba Jan 11 at 18:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.