Google Drive permissions

3,261 views
Skip to first unread message

Kevin Sanghvi

unread,
Jun 14, 2016, 12:38:50 PM6/14/16
to Google Apps Manager
Hello, 

We are using latest GAM version 3.65

Requesting help to update Google Drive file permissions to Restrict and Off - Specific people can access.

Thanks,
Kevin Sanghvi

Ross Scroggs

unread,
Jun 14, 2016, 5:41:06 PM6/14/16
to google-ap...@googlegroups.com
Kevin,

GAM 3.65 can't do this directly, you could get the information with a fair amount of scripting.
I've added the capability to do this to GAM 3.66 and submitted a pull request to Jay for it.
In the meantime you can get a version here that does what you want: https://github.com/taers232c/GAM/releases/tag/v3.66
To get minimum information: gam user test us...@domain.com show filelist id title permissions
To get maximum information: gam user test us...@domain.com show filelist allfields

I've added field selection to gam show fileinfo just like gam show filelist.
gam user te...@domain.com show fileinfo <DriveFileId> <DriveFieldName>*

Ross

--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/fa5a00ba-59d1-4e3d-b4f4-26f0b1408574%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kevin Sanghvi

unread,
Jun 15, 2016, 3:16:42 AM6/15/16
to Google Apps Manager
Hello Ross,

Thank you for the information.

I'm trying to run the command : gam user <fileowneremailaddress> delete drivefileacl <fileid> <permissionid>. It's showing permission not found. I had tried writer parameter as a permission in the end. Basically, we are looking to remove Anyone with the link permission and Can edit rights. There are around 4K files.

Request you to help.

Thanks,
Kevin Sanghvi

Ross Scroggs

unread,
Jun 15, 2016, 9:05:16 AM6/15/16
to google-ap...@googlegroups.com
Kevin,

If you are using a permission ID, you should enter: gam user <fileowneremailaddress> delete drivefileacl <fileid> id:<permissionid>
Without the id:, GAM interprets <permissionid> as an email address.

--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Kevin Sanghvi

unread,
Dec 27, 2016, 12:38:38 PM12/27/16
to GAM for G Suite
Hello Ross,

We are using GAM version: GAM 4.03 to remove drive sharing permissions. 

Extracted files through : gam user us...@domain.com show filelist id title permissions
Removing permissions through : gam user <fileowneremailaddress> delete drivefileacl <fileid> id:<permissionid> and getting error "permissions not found"

Please assist if there is any change in syntax.

Thanks, 
Kevin Sanghvi

On Wednesday, June 15, 2016 at 6:35:16 PM UTC+5:30, Ross Scroggs wrote:
Kevin,

If you are using a permission ID, you should enter: gam user <fileowneremailaddress> delete drivefileacl <fileid> id:<permissionid>
Without the id:, GAM interprets <permissionid> as an email address.

On Jun 15, 2016, at 12:16 AM, Kevin Sanghvi <sanghv...@gmail.com> wrote:

Hello Ross,

Thank you for the information.

I'm trying to run the command : gam user <fileowneremailaddress> delete drivefileacl <fileid> <permissionid>. It's showing permission not found. I had tried writer parameter as a permission in the end. Basically, we are looking to remove Anyone with the link permission and Can edit rights. There are around 4K files.

Request you to help.

Thanks,
Kevin Sanghvi



On Tuesday, 14 June 2016 22:08:50 UTC+5:30, Kevin Sanghvi wrote:
Hello, 

We are using latest GAM version 3.65

Requesting help to update Google Drive file permissions to Restrict and Off - Specific people can access.

Thanks,
Kevin Sanghvi


--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

Ross Scroggs

unread,
Dec 27, 2016, 1:01:49 PM12/27/16
to google-ap...@googlegroups.com
Kevin,

That is the correct syntax, try: gam user <fileowneremailaddress> show drivefileacl <fileid> 
Is the <permissionid> that you're specifying shown?

You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Kevin Sanghvi

unread,
Dec 28, 2016, 5:30:45 AM12/28/16
to GAM for G Suite
Hi Ross,

Thanks for the reply.

Yes, the permissionid is shown. Please find attached Screenshot.

Thanks,
Kevin Sanghvi
DriveFileAcl.JPG

Ross Scroggs

unread,
Dec 28, 2016, 9:28:15 AM12/28/16
to google-ap...@googlegroups.com
Kevin,

Please show me the command that fails.

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

For more options, visit https://groups.google.com/d/optout.
<DriveFileAcl.JPG>

Kevin Sanghvi

unread,
Dec 31, 2016, 11:48:09 AM12/31/16
to GAM for G Suite
Hello Ross,

The permissions are removed as required now, as i made proper changes in id. 

Could you please let me know, how the command would be designed in case if we want revoke all sharing permissions from multiple collaborators. In the case with multiple permission id. I tried something like this and the initial permission got revoked.


gam user us...@domain.com delete drivefileacl 11Gn1mjea56hcjmVX8k5HYilsnys0tHqthN5-CmECJzg id:07972057491779788038 id:10176094751799018778 id:13730567792278019295


Thanks,
Kevin Sanghvi

Kevin Sanghvi

unread,
Dec 31, 2016, 12:13:46 PM12/31/16
to GAM for G Suite
Hello Ross,


I tried the command - 

gam user dep...@domain.com transfer drive man...@domain.com, however it doesn't remove all the ACL's provided by dep...@domain.com. Owner is getting changed to man...@domain.com.

Basically, we want to revoke the ACL of files of departing employee so that any other user in the organization cannot access the file.

Thanks,
Kevin Sanghvi

Ross Scroggs

unread,
Dec 31, 2016, 2:43:16 PM12/31/16
to google-ap...@googlegroups.com
Kevin,

This can be done with gam and an additional script that I wrote.
What is your gam version?
Are you on Windows or Linux/Mac OS?
Does man...@domain.com own other files?

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Kevin Sanghvi

unread,
Jan 1, 2017, 8:52:19 AM1/1/17
to GAM for G Suite
Hello Ross,

Thanks for the reply.

GAM version is GAM 4.03 on Windows platform.
Basically, man...@domain.com is a generic account where we store all drive data of left employees, yes he owns other files.

Thanks, 
Kevin Sanghvi

Ross Scroggs

unread,
Jan 2, 2017, 11:42:19 AM1/2/17
to google-ap...@googlegroups.com
Kevin,

Does man...@domain.com allow anyone to access any of its files? If not, then this can be accomplished by gam 4.03 and a Python script.
If man...@domain.com shares some files from other departed users but you don't want the newly departed user's file shared, you'll have to use my advanced gam.
In either case, you have to install Python on your Windows machine: https://www.python.org/downloads/release/python-2713/

Email me directly and we can discuss your options,

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
Reply all
Reply to author
Forward
0 new messages