Reputation: 159
I know that I can access my google drive files from colab with a code like this:
from google.colab import drive
drive.mount('/content/drive')
But in this way, only me is able to access data file located on my drive. If I share my colab notebook with someone, how can he/she access to that file? Obviously above code is not applicable for him/her, because he does can't access my account to authorize colab.
Upvotes: 11
Views: 15473
Reputation: 40838
There are 2 ways.
You share the folder with him. He click the folder and choose "Add to My Drive". It will create a symlink (it won't copy, won't take space). He can now mount it the same way as you, using drive.mount(..)
.
Share the folder with him. Then access the folder and files within using pydrive, not drive.mount(). You must use the FILE_ID instead of file names to refer to those folder and files.
Upvotes: 8
Reputation: 39
What you want to do is to share permissions of shared folders, in this case other users can edit, comment. or view shared folders, for that:
Go to drive.google.com
Select the folder that you want to change owners.
Upvotes: 1