# Secure a Public Storage Bucket - gcloud (Solution)

## Overview

* Labs are timed and cannot be paused. The timer starts when you click **Start Lab**.
    
* The included cloud terminal is preconfigured with the gcloud SDK.
    
* Use the terminal to execute commands and then click **Check my progress** to verify your work.
    

## Challenge scenario

* You're a cloud architect for a media company. A critical video archive bucket named `qwiklabs-gcp-01-bfbfad5afdd7`\-urgent has mistakenly been made public. Your task is to quickly secure it in the provided time frame.
    

Click **Check my progress** to verify the objective.

Make the media archive folder private.

---

## Solution of Lab

%[https://youtu.be/wca4yA8LwHI]

```apache
curl -LO raw.githubusercontent.com/ePlus-DEV/storage/refs/heads/main/labs/Secure%20a%20Public%20Storage%20Bucket%20-%20gcloud/lab.sh
source lab.sh
```

**Script Alternative**

**Replace `[Bucket-name]`**

```apache
gsutil iam ch -d allUsers:objectViewer gs://[Bucket-name]
gsutil iam get gs://[Bucket-name]
```
