Setting users drive files to readonly, in bulk.

11 views
Skip to first unread message

Christopher Noon

unread,
Jun 25, 2026, 9:38:42 AM (3 days ago) Jun 25
to GAM for Google Workspace
Hello,
I'm trying to bulk edit a large list of files to enable the readonly flag.  This worked fine in my testing, but in real world attempts, I'm seeing timeouts on certain files (resulting in GAM doing backoffs for each bad file and generally ruining the bulk job).  The command I'm running is:

gam csv ./driveFilesList.csv gam user ~Owner update drivefile ~id contentrestrictions readonly true

Looking at the fileinfo for a good result versus a bad result, the only difference I can see is that the good files have capability:
"canRemoveContentRestriction: True"
and bad files have:
"canRemoveContentRestriction: False"

I believe that those capability values are calulated and not setable.  Any ideas for getting around this?  

Chris
Reply all
Reply to author
Forward
0 new messages