Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions appengine/flexible/storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Before you can run or deploy the sample, you will need to do the following:

2. Create a Cloud Storage Bucket. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command:

$ gsutil mb gs://[your-bucket-name]
$ gcloud storage buckets create gs://[your-bucket-name]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The gcloud storage buckets create command enables Uniform Bucket-Level Access (UBLA) by default. This is a change from gsutil mb, which created buckets with fine-grained access controls (ACLs enabled) by default.

When UBLA is enabled, ACLs are disabled. This will cause the next step, gcloud storage buckets update ... --predefined-default-object-acl=public-read, to fail. The application code, which uses blob.make_public(), would also fail.

To maintain the original behavior and ensure the sample works as described, you should explicitly disable UBLA during bucket creation.

Suggested change
$ gcloud storage buckets create gs://[your-bucket-name]
$ gcloud storage buckets create gs://[your-bucket-name] --uniform-bucket-level-access=false


3. Set the default ACL on your bucket to public read in order to serve files directly from Cloud Storage. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command:

$ gsutil defacl set public-read gs://[your-bucket-name]
$ gcloud storage buckets update gs://[your-bucket-name] --predefined-default-object-acl=public-read

4. Update the environment variables in ``app.yaml``.

Expand Down
4 changes: 2 additions & 2 deletions appengine/flexible_python37_and_earlier/storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Before you can run or deploy the sample, you will need to do the following:

2. Create a Cloud Storage Bucket. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command:

$ gsutil mb gs://[your-bucket-name]
$ gcloud storage buckets create gs://[your-bucket-name]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The gcloud storage buckets create command enables Uniform Bucket-Level Access (UBLA) by default. This is a change from gsutil mb, which created buckets with fine-grained access controls (ACLs enabled) by default.

When UBLA is enabled, ACLs are disabled. This will cause the next step, gcloud storage buckets update ... --predefined-default-object-acl=public-read, to fail. The application code, which uses blob.make_public(), would also fail.

To maintain the original behavior and ensure the sample works as described, you should explicitly disable UBLA during bucket creation.

Suggested change
$ gcloud storage buckets create gs://[your-bucket-name]
$ gcloud storage buckets create gs://[your-bucket-name] --uniform-bucket-level-access=false


3. Set the default ACL on your bucket to public read in order to serve files directly from Cloud Storage. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command:

$ gsutil defacl set public-read gs://[your-bucket-name]
$ gcloud storage buckets update gs://[your-bucket-name] --predefined-default-object-acl=public-read

4. Update the environment variables in ``app.yaml``.

Expand Down