Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Acl Command Not working for the file uploaded in bucket.

I am trying to execute acl command for copying the sharing settings for the newly copied objects from another bucket. Command which I am using:

gsutil acl ch -u AllUsers:R gs://storage-labs-commandline/WhatsApp Image 2019-10-23 at 18.31.31.jpeg

 Error:

CommandException: "acl" command does not support "file://" URLs. Did you mean to use a gs:// URL?

2 Answers

The object name you have listed (WhatsApp Image 2019-10-23 at 18.31.31.jpeg) has spaces in it which the command line interprets as a separator for parameters. You need to either escape the spaces with a slash (WhatsApp Image 2019-10-23 at 18.31.31.jpeg) or surround the whole thing with double quotes ("gs://storage-labs-commandline/WhatsApp Image 2019-10-23 at 18.31.31.jpeg")

I got a similar error when i had the wrong context. 

$ gsutil mb -class nearline -l northamerica-northeast1 gs://test-worst-storage-junk

CommandException: "mb" command does not support "file://" URLs. Did you mean to use a gs:// URL?

$ gsutil mb -c nearline -l northamerica-northeast1 gs://test-worst-storage-junk
Creating gs://test-worst-storage-junk/…

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?