# Public and restricted files (and sharing one file)

> Choose who can list and read your files, make a single file public, or create a link that expires.

Source: https://docs.phluit.com/products/object-storage/s3-public-and-restricted-files/

## File listing

On the bucket's **Settings** tab, under **File listing**:

-   **Restricted** (default): only your keys can list and read files. Best for backups and private data.
-   **Public**: anyone with the address can list and download every file. Use it only for buckets meant to be public, like website assets.

Choose one and click **Save**.

## Share one file, keep the rest private

-   Make the file public with your tool: `aws s3 cp photo.jpg s3://my-bucket/photo.jpg --acl public-read --endpoint-url https://fra1.digitaloceanspaces.com`, or "Make public" / "Share" in Cyberduck. It is then at `https://my-bucket.fra1.digitaloceanspaces.com/photo.jpg`.
-   Or create a link that expires: `aws s3 presign s3://my-bucket/report.pdf --expires-in 3600 --endpoint-url https://fra1.digitaloceanspaces.com` (here, one hour).

Public files can also be served faster through the CDN: [Turn on the CDN](/products/object-storage/s3-cdn/).
