Google Drive Management - allowFileDiscovery issue

1,537 views
Skip to first unread message

Steven Whiting

unread,
May 11, 2017, 7:37:22 AM5/11/17
to GAM for G Suite
So I've used this command before where I worked and worked fine. Now on my setup, however, I'm getting the following error when trying to give writer permissions of one users file to another user. I've read the wiki documentation and my command appears just fine.

gam user <username> add drivefileacl <fileid> user <username of the person who needs permission> role writer withlink

ERROR: 403: The allowFileDiscovery field is only applicable for permissions of type 'domain' or 'anyone'. - forbidden






Ross Scroggs

unread,
May 11, 2017, 8:26:30 AM5/11/17
to google-ap...@googlegroups.com
Steven,

I belive that it's always been true that withlink is only applicable to 'anyone' or 'domain'; gam recently changed the ACL commands to the newer Google API that enforces the restriction.
In the old API, the characteristic was called withLink, in the new API the characteristic is called allowFileDiscovery; withLink = True is equivalent to allowFileDiscovery = False
Under Step 2, see Anyone with a link to the file

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/898b49ef-89db-4755-872c-70711214643b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
.

Steven Whiting

unread,
May 11, 2017, 9:08:45 AM5/11/17
to GAM for G Suite
OK thanks.

Although I'm a little confused. So the commands have changed? I assume the GAM guides hasn't been updated to reflect this then?

Do you have an example? I can only get the above to work if I remove the withlink. I've tried replacing with allowfilediscovery but it doesn't know that command.


On Thursday, May 11, 2017 at 1:26:30 PM UTC+1, Ross Scroggs wrote:
Steven,

I belive that it's always been true that withlink is only applicable to 'anyone' or 'domain'; gam recently changed the ACL commands to the newer Google API that enforces the restriction.
In the old API, the characteristic was called withLink, in the new API the characteristic is called allowFileDiscovery; withLink = True is equivalent to allowFileDiscovery = False
Under Step 2, see Anyone with a link to the file

On May 11, 2017, at 4:37 AM, Steven Whiting <admin.s...@stevenwhiting.uk> wrote:

So I've used this command before where I worked and worked fine. Now on my setup, however, I'm getting the following error when trying to give writer permissions of one users file to another user. I've read the wiki documentation and my command appears just fine.

gam user <username> add drivefileacl <fileid> user <username of the person who needs permission> role writer withlink

ERROR: 403: The allowFileDiscovery field is only applicable for permissions of type 'domain' or 'anyone'. - forbidden







--
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-manager+unsub...@googlegroups.com.
.

Steven Whiting

unread,
May 11, 2017, 9:27:39 AM5/11/17
to GAM for G Suite
Hmm, as far as I can currently tell it appears a lot of the commands referenced in the GAM guides for drive management are no longer valid?


They were working back in March but now all the commands I had written down so I could cut and paste and that worked, no longer do so.

transferownership now appears to be an invalid command despite what the guide states:

gam user t...@acme.org update drivefileacl 0B8aCWH-xLi2NckxXOEp5REUtNEE sa...@acme.org role owner transferownership true

ERROR: transferownership is not a valid argument for "gam <users> update drivefileacl"

Ross Scroggs

unread,
May 11, 2017, 10:25:30 AM5/11/17
to google-ap...@googlegroups.com
Steven,

I'm not sure about' 'a lot' but yes, you've hit another API change. When you make Sally the owner, Tim is demoted to writer, you've got no choice in the matter; thus there is no need for the transferownership option.

I'll work on the Wiki later this morning.

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.

Steven Whiting

unread,
May 11, 2017, 11:04:27 AM5/11/17
to GAM for G Suite
Thank you. I've muddled along and worked out a few commands now regarding Google drive management with GAM. Appears quite a few have changed.
Reply all
Reply to author
Forward
0 new messages